Answers for "js var = number < number"

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]
Posted by: Guest on May-15-2020
1

javascript number length

var num = 1234
number.toString().length; // 4
Posted by: Guest on April-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language