Saturday, May 27, 2017

JavaScript - A simple demo of NaN

var a = NaN;
console.log(a); //NaN
console.log(typeof(a)); //Number

What will be the outcome of below code?
if(a <7 || a > 7 || a==7 || NaN==NaN || a==NaN){
 console.log(yes)
}else{
 console.log(no)
}

2 comments:

Anonymous said...

Hello there, I do think your web site might be having
browser compatibility problems. Whenever I take a look at
your web site in Safari, it looks fine however, when opening in I.E., it has
some overlapping issues. I simply wanted to give you a quick heads up!
Other than that, wonderful site!

Anonymous said...

I've learn a few excellent stuff here. Certainly worth bookmarking
for revisiting. I wonder how a lot effort you place to create this kind of fantastic informative web
site.