javascript - The 3 different equals -
what difference between =
, ==
, , ===
?
i think using 1 equal sign declare variable while 2 equal signs comparison condition , lastly 3 equal signs comparing values of declared variables.
you have =
assignment operator, ==
'equal' comparison operator , ===
'identical' comparison operator.
$a = $b assign sets $a equal $b. $a == $b equal true if $a equal $b. $a === $b identical true if $a equal $b, , of same type. (introduced in php 4)
for more info on need ==
, ===
, , situations use each, @ the docs.
Comments
Post a Comment