Use Identity Operator (JavaScript)

Replaces the "==" operator with the "===" operator and the "!=" operator with the "!==" operator.

Availability

From the context menus or via shortcuts:

  • when the edit caret is on a comparison operator ("==" or "!=").

Example

if(obj1==obj2)
  document.createTextNode("Objects are equal"));

Result:

if(obj1===obj2)
  document.createTextNode("Objects are equal"));