+ 2
=! vs != ?
which is diference between =! and != ?
5 Antworten
+ 7
Actually =! is not one operator but two
!= means NOT EQUAL
=! will assign the invers value of a var :
var1 = !var2
+ 2
=! is actually 2 operators.
the first one is assignment "=", the second is the logical operator NOT "!".
For example x =! true means that "x" value is "false".
On the other hand, "!=" is a relational operator and can be used, for example, in the condition of an "if" statement.
0
There is no =! operator.
It's bad coding style.
bad: x =! y;
good: x = !y;
Both ways might work though, giving x the invers of y.
0
==
0
مالفرق بين
5=8
5==8