==
and !=
JS-00502084 h = e ? r : s;
2085 return {
2086 left: c(
2087 l % 2 == 1 && u % 2 == 1 && !d && e ? i.left - 1 : i.left,2088 ),
2089 top: h(i.top),
2090 bottom: h(i.bottom),
2084 h = e ? r : s;
2085 return {
2086 left: c(
2087 l % 2 == 1 && u % 2 == 1 && !d && e ? i.left - 1 : i.left,2088 ),
2089 top: h(i.top),
2090 bottom: h(i.bottom),
2080 u = r(i.width),
2081 f = ["left", "right"].indexOf(t.placement) !== -1,
2082 d = t.placement.indexOf("-") !== -1,
2083 c = e ? (f || d || l % 2 == u % 2 ? r : a) : s,2084 h = e ? r : s;
2085 return {
2086 left: c(
1060 let e = $(this).attr("data-filename"),
1061 t = $("#modal");
1062 t.find(".modal-body code").load(e, function (s, n, t) {
1063 if (n == "error") {1064 let e = "Error: ";
1065 $("#modal-error").html(e + t.status + " " + t.statusText);
1066 } else $(".js-download-cite").attr("href", e);
852 if (!n.length) return;
853 let e = window.location.hash.replace("#", ""),
854 t = "*";
855 e != "" && !isNaN(e) && (t = ".pubtype-" + e); 856 let s = "pubtype";
857 (o[s] = t), (r = D(o)), n.isotope(), $(".pubtype-select").val(t);
858 }
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