not equal sign not working in javascript -
this question has answer here:
- ! operator in javascript 5 answers
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
Post a Comment