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


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

c# - Can I intercept a SOAP response in .NET before a content type binding mismatch ProtocolException? -

css - Can I use the :after pseudo-element on an input field? -