Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 254 Bytes

eqeqeq.md

File metadata and controls

23 lines (17 loc) · 254 Bytes

===

Use the triple equality operator as it will work just as expected.

JavaScript

Right:

var a = 0;
if (a !== '') {
  console.log('winning');
}

Wrong:

var a = 0;
if (a == '') {
  console.log('losing');
}