integer values in javascript code example
Example 1: javascript two character integer
var myNumber = 7;
var formattedNumber = ("0" + myNumber).slice(-2);
console.log(formattedNumber);
Example 2: js int
var myInt = 69420
1+1//int
1+"1"//string
var myNumber = 7;
var formattedNumber = ("0" + myNumber).slice(-2);
console.log(formattedNumber);
var myInt = 69420
1+1//int
1+"1"//string