Answers for "if parameter is not number in js"

0

if parameter is not number in js

let num1 = 'Hello';
if(isNaN(num1)){
    console.log(num1 + ' is not a number');
} else{
    console.log(num1 + ' is a number');
}
Posted by: Guest on December-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language