==
and !=
JS-0050377 }
378 ];
379
380 if (config.closed_at != "") {381 patchDoc.push({
382 op: "add",
383 path: "/fields/System.History",
71 if (!!config.ado_token && !!config.ado) { config.ado.token = config.ado_token; }
72 if (!!config.github_token && !!config.github) { config.github.token = config.github_token; }
73
74 if (config.log_level != undefined) 75 {
76 console.log(`Setting logLevel to ${config.log_level.toLowerCase()}...`); // skipcq JS-0002
77 log.setLevel(config.log_level.toLowerCase(), true);
It is considered good practice to use the type-safe equality operators ===
and !==
instead of their regular counterparts ==
and !=
.
The strict equality operators (===
and !==
) use the strict equality comparison algorithm to compare two operands.
false
.true
only if they refer to the same object.null
or both operands are undefined
, return true
.NaN
, return false
.+0
and -0
are considered to be the same value.true
or both false
.The most notable difference between this operator and the equality (==
) operator is that if the operands are of different types, the ==
operator attempts to convert them to the same type before comparing.
a == b
foo == true
bananas != 1
value == undefined
typeof foo == 'undefined'
'hello' != 'world'
0 == 0
true == true
foo == null
a === b
foo === true
bananas !== 1
value === undefined
typeof foo === 'undefined'
'hello' !== 'world'
0 === 0
true === true
foo === null