3102 s++
3103 )
3104 a(s);
3105 return i.body.innerHTML;3106 }
3107 var Yt = "tooltip",
3108 zt = i.default.fn[Yt],
1341 if (!t || !t.parentElement || F()) return document.documentElement;
1342 for (var e = t.parentElement; e && I(e, "transform") === "none"; )
1343 e = e.parentElement;
1344 return e || document.documentElement;1345 }
1346 function et(t, e, n, i) {
1347 var o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4],
1131 ? ["TH", "TD", "TABLE"].indexOf(n.nodeName) !== -1 &&
1132 I(n, "position") === "static"
1133 ? R(n)
1134 : n1135 : t
1136 ? t.ownerDocument.documentElement
1137 : document.documentElement;
1130 return i && i !== "BODY" && i !== "HTML"
1131 ? ["TH", "TD", "TABLE"].indexOf(n.nodeName) !== -1 &&
1132 I(n, "position") === "static"
1133 ? R(n)1134 : n
1135 : t
1136 ? t.ownerDocument.documentElement
1129 var i = n && n.nodeName;
1130 return i && i !== "BODY" && i !== "HTML"
1131 ? ["TH", "TD", "TABLE"].indexOf(n.nodeName) !== -1 &&
1132 I(n, "position") === "static"1133 ? R(n)
1134 : n
1135 : t
Variables should be used inside of their binding context.
This helps avoid difficult bugs with variable hoisting.
It is a bad practice to use var
declarations because variables declared using var
can be accessed in a function-wide scope.
They can even be accessed before declaration.
In such cases, their value would be undefined
because only declarations and not initializations are hoisted.
function doIf() {
if (cond()) {
var build = true;
}
console.log(build);
}
function doIfElse() {
if (cond()) {
var build = true;
} else {
var build = false;
}
console.log(build)
}
function doIf() {
let build;
if (cond()) {
build = true;
}
console.log(build);
}