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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -