Find your content:

Search form

You are here

Why === instead of == javascript - Interview Questions - Help Interview

 
Share

=== check values as well as type of the both operands whereas == only check the values. Example given below

10 == '10'  // true  | check value: 10 equal 10
10 == 10    // true  | check value: 10 equal 10

10 === '10' // false | check type: int not equal string
10 === 10   // true  | check type: int equal int, check value: 10 equal 10

My Block Status

My Block Content