+4 votes
40 views
asked in java script by (2.6k points)

 

for sample

if (c === 0){
   //
}

What is the meaning of === here in above ex?

1 Answer

+1 vote
answered by (2.3k points)

it checks that c is equal to the number 0. === is the strict equality operator. It does not attempt to type coerce the operands.

For example:

0 == false; //true (false coerces to 0)
0 === false; //false (no type coercion)

Categories

...