oddeven("asd") output keep showing asd is odd. How to make it show asd is not a number?
let num;
function oddeven(num){
num = parseInt(num);
if(num%2 == 0){
document.write(num + " is even" + "<br>");
}else if(num%2 != 0){
document.write(num + " is odd" + "<br>")
}else
document.write(num + " is not a number" + "<br>");
}
oddeven(2);
oddeven(1);
oddeven(10);
oddeven(7);
oddeven("asd");