Answers for "number print from djavascript"

2

how to print numbers in javascript

for (var i = 1; i <= 100; i++) {
 console.log(i);
}
//the boolean or the second term in the for statement
//which in this case is i <= 100 makes the console print
// numbers 1-100 
//KEY: REPLACE !)) WITH THE NUMBER U WANT IT TO GO UNTIL
Posted by: Guest on June-05-2020
0

get the whole value of a number javascript

var value = 2.9802453587962963;
var wholeNum = Math.floor(value);
console.log(wholeNum);  // output ==> 2
Posted by: Guest on September-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language