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

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -