KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: Implied string comparison, 0='', but 1='1' Executing the following case in javascript, I get 0 equal to '' (an empty string) var a = 0; var b = '';//empty string if(a==b){ console.log('equal');//this is printed in console }else{ console.log('not equal'); } Could anyone guide that what is the reason behind this?
Tags (comma-separated)
Save Edits
Cancel