const
declarations for variables that are never reassigned JS-024224 );
25 console.debug("User theming enabled.");
26 let t,
27 n = s();28 switch ((console.debug(`User's theme variation: ${n}`), n)) {
29 case 0:
30 t = !1;
1094 document.activeElement !== document.documentElement &&
1095 document.activeElement) ||
1096 null,
1097 n =1098 t instanceof HTMLInputElement ||
1099 t instanceof HTMLTextAreaElement;
1100 p && !n && (e.preventDefault(), u());
1088 e.classList.contains("searching") && u();
1089 }
1090 if (e.key === "/") {
1091 let t =1092 (document.hasFocus() &&
1093 document.activeElement !== document.body &&
1094 document.activeElement !== document.documentElement &&
1080 window.getSelection().removeRange(e);
1081 }),
1082 H();
1083 let e = ".js-github-release";1084 $(e).length > 0 && I(e, $(e).data("repo")),
1085 document.addEventListener("keyup", (e) => {
1086 if (e.code === "Escape") {
1070 $(".js-copy-cite").click(function (t) {
1071 t.preventDefault();
1072 let e = document.createRange(),
1073 n = document.querySelector("#modal .modal-body");1074 e.selectNode(n), window.getSelection().addRange(e);
1075 try {
1076 document.execCommand("copy");
Variables that are never re-assigned a new value after their initial declaration should be declared with the const
keyword.
This prevents the programmer from erroneously re-assigning to a read-only variable, and informs those reading the code that a variable is a constant value.
let pi = Math.PI
for (let x of xs) {
use(x);
}
let { a, b } = object;
use(a, b);
const pi = Math.PI
for (const x of xs) {
use(x);
}
const { a, b } = object;
use(a, b);