View Categories

JavaScript – Use === Comparison – UI Policy scriptFalse

Impact Area

Manageability

Severity

Warning

Affected Element

UI Policy

Rule number #

SN-0331

Impact #

The double equals operator can give unexpected results when comparing objects of different types.

Remediation #

Use the triple equals operator.

Time to fix

5 min

Code examples #

Noncompliant code

if (var == ‘howdy’) {…} // Noncompliant

Compliant code

if (var === ‘howdy’) {…}

Powered by BetterDocs