Recently I saw a statement that works in javascript on the internet and I wonder what the meaning of a single equal sign (=) in javascript as I mostly use in if statements i
Single = is an assignment operator and will always equate to true in an if statement (assuming it is a non negative value).
=
Double = ,as in ==, is a comparison and will equate to true only if the values on either side of the operator are equal.
==