convert number to words javascript w3schools code example
Example 1: javascript int values
var min = parseInt("2");
var max = parseInt("3");
Example 2: javascript number to string
const toNumber = str => +str;
// Example
toNumber('42'); // 42
Example 3: primitive numbers javascript coding sample increas by 1
function test_prime(n){
if (n===1) {
return false;
}else if(n === 2){
return true;
}else{
for(var x = 2; x < n; x++){
if(n % x === 0){
return false;
}
}
return true;
}
}
console.log(test_prime(37));