News




Call Anirudha on Skype

Blogger

JavaScript Function .prototype

Download: Fast, Fun, Awesome



In Javascript if you try to run this code then only #4 statement will print the value.

<script type="text/javascript">
function print(obj){
    console.log(obj);
}
if(undefined){
    print ("undefined");
}
if(null){
    print('null');
}
if(isNaN(null)){
    print('isNaN(null)');
}
if(isNaN(undefined)){ // only this statement will come true
    print('isNaN(undefined)');
}
</script>


Comments

Gravatar # re: Running isNaN(undefined) come true in JavaScript !
Posted by Anna Holland on 3/5/2013 12:13 AM
Hi Anirudha,

Great blog! My name is Anna Holland, and I am a Marketing Coordinator at Syncfusion. I am reaching out to see if you would blog about one of our free e-books, collectively known as the Succinctly series. It is a great way to add value to your personal website. For more information and details please contact me at annah@syncfusion.com. Look forward to hearing from you soon!
Post A Comment
Title:
Name:
Email:
Comment:
Verification: