JavaScript

May 14, 2023

Addition Operator JavaScript

Program to use Addition Operator JavaScript Language


let a = 10
let b = 20
let total;
total = a + b;
console.log("total number is = ", total);

 

Output


total number is = 30

Steps Description

  1. Declare three variables a, b and total
  2. Initialize both variables with value of 10 and 20 respectively a=10, b=20
  3. Assign total variable with Assignment Operators (=) with the sum/Addition value of variables a and b
  4. a, b variables की value को (+) Addition Operators ki सहयता से a+b numbers को adds/sum जोड़ा गया हैं
  5. console.log inbuilt function की मदद्द से total variable की value को display किया गया हैं

by : Suhel Akhtar

Quick Summary:

Addition Operator JavaScript Program