---
title: JavaScript – Use === comparison
description: "Impact Area Manageability Severity Warning Affected Element All ## Rule number **SN-0105** ## 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 ##…"
url: "https://community-staging.qualityclouds.com/qcdocs/qcr/rules/javascript-use-comparison/"
updated: "2025-03-21"
category: Rules for ServiceNow / JavaScript Rules
---

# JavaScript – Use === comparison

Impact Area

Manageability

           Severity

Warning

           Affected Element

All

## Rule number

**SN-0105**

## 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’) {…}
