Why is my javascript equals operator always return true? -
the following if statement evaluates true:
if (a = b) { //... }
why true?
you need use comparing operator
if(a == b) ...
instead of assigning one
the following if statement evaluates true:
if (a = b) { //... }
why true?
you need use comparing operator
if(a == b) ...
instead of assigning one
Comments
Post a Comment