not equal sign not working in javascript -


this question has answer here:

i using not equal sign convert false true giving false. have tried 0 , 1 working fine. when changing value "false" "true" working problem "false" only.

<script type="text/javascript"> var test= "false"; alert(!test) </script> 

you assigning string "false", assign boolean false

var test = false; alert(!test);  

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -