if parameter is not number in js code example
Example: 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');
}
let num1 = 'Hello';
if(isNaN(num1)){
console.log(num1 + ' is not a number');
} else{
console.log(num1 + ' is a number');
}