assign integer value in javascript code example
Example 1: add variable numerically in javascript
//use parseFloat(x); to change string to number
a=10;
b=20;
console.log(parseFloat(a)+parseFloat(b));//this will give a+b=30
//while
consle.log(a+b); //will give a+b=1020 [as String]
Example 2: var javascript
var is a keyword to define the varible in js but as of es-6 we, use let and const keywords for the same