diff --git a/files/es/glossary/base64/index.md b/files/es/glossary/base64/index.md
index 3724042f523ed3..35b9c38b10467c 100644
--- a/files/es/glossary/base64/index.md
+++ b/files/es/glossary/base64/index.md
@@ -127,14 +127,14 @@ function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
? nChr - 65
: nChr > 96 && nChr < 123
- ? nChr - 71
- : nChr > 47 && nChr < 58
- ? nChr + 4
- : nChr === 43
- ? 62
- : nChr === 47
- ? 63
- : 0;
+ ? nChr - 71
+ : nChr > 47 && nChr < 58
+ ? nChr + 4
+ : nChr === 43
+ ? 62
+ : nChr === 47
+ ? 63
+ : 0;
}
function base64DecToArr(sBase64, nBlocksSize) {
@@ -169,14 +169,14 @@ function uint6ToB64(nUint6) {
return nUint6 < 26
? nUint6 + 65
: nUint6 < 52
- ? nUint6 + 71
- : nUint6 < 62
- ? nUint6 - 4
- : nUint6 === 62
- ? 43
- : nUint6 === 63
- ? 47
- : 65;
+ ? nUint6 + 71
+ : nUint6 < 62
+ ? nUint6 - 4
+ : nUint6 === 62
+ ? 43
+ : nUint6 === 63
+ ? 47
+ : 65;
}
function base64EncArr(aBytes) {
@@ -224,27 +224,27 @@ function UTF8ArrToStr(aBytes) {
aBytes[++nIdx] -
128
: nPart > 247 && nPart < 252 && nIdx + 4 < nLen /* five bytes */
- ? ((nPart - 248) << 24) +
- ((aBytes[++nIdx] - 128) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
- ? ((nPart - 240) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
- ? ((nPart - 224) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
- ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
- : /* nPart < 127 ? */ /* one byte */
- nPart,
+ ? ((nPart - 248) << 24) +
+ ((aBytes[++nIdx] - 128) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
+ ? ((nPart - 240) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
+ ? ((nPart - 224) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
+ ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
+ : /* nPart < 127 ? */ /* one byte */
+ nPart,
);
}
@@ -265,14 +265,14 @@ function strToUTF8Arr(sDOMStr) {
nChr < 0x80
? 1
: nChr < 0x800
- ? 2
- : nChr < 0x10000
- ? 3
- : nChr < 0x200000
- ? 4
- : nChr < 0x4000000
- ? 5
- : 6;
+ ? 2
+ : nChr < 0x10000
+ ? 3
+ : nChr < 0x200000
+ ? 4
+ : nChr < 0x4000000
+ ? 5
+ : 6;
}
aBytes = new Uint8Array(nArrLen);
diff --git a/files/es/web/api/window/scrolly/index.md b/files/es/web/api/window/scrolly/index.md
index 68ea9aa5d44a2d..260371baa8c5a9 100644
--- a/files/es/web/api/window/scrolly/index.md
+++ b/files/es/web/api/window/scrolly/index.md
@@ -47,13 +47,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## Especificación
diff --git a/files/es/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/es/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
index 428905af2eba0e..1d640e85746f19 100644
--- a/files/es/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
+++ b/files/es/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
@@ -475,8 +475,8 @@ formas de _enviar_, y de **subir archivos**:
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = oTarget.action;
this.status = 0;
diff --git a/files/es/web/javascript/reference/global_objects/array/copywithin/index.md b/files/es/web/javascript/reference/global_objects/array/copywithin/index.md
index 30fd135af8edb0..30157019569f9e 100644
--- a/files/es/web/javascript/reference/global_objects/array/copywithin/index.md
+++ b/files/es/web/javascript/reference/global_objects/array/copywithin/index.md
@@ -127,8 +127,8 @@ if (!Array.prototype.copyWithin) {
positiveT
? [target, stop - start, hold]
: positiveS
- ? [target, stop, hold]
- : [target, start, hold],
+ ? [target, stop, hold]
+ : [target, start, hold],
),
this.join(delimiter).split(delimiter).slice(zero, length)
);
diff --git a/files/es/web/javascript/reference/global_objects/proxy/index.md b/files/es/web/javascript/reference/global_objects/proxy/index.md
index 684055041c00f0..0a18712ec74e72 100644
--- a/files/es/web/javascript/reference/global_objects/proxy/index.md
+++ b/files/es/web/javascript/reference/global_objects/proxy/index.md
@@ -422,7 +422,7 @@ var docCookies = new Proxy(docCookies, {
return oTarget.setItem(sKey, vValue);
},
deleteProperty: function (oTarget, sKey) {
- if (!sKey in oTarget) {
+ if ((!sKey) in oTarget) {
return false;
}
return oTarget.removeItem(sKey);
diff --git a/files/es/web/javascript/reference/operators/conditional_operator/index.md b/files/es/web/javascript/reference/operators/conditional_operator/index.md
index 97e861addccbf5..e0cf6e5aea7353 100644
--- a/files/es/web/javascript/reference/operators/conditional_operator/index.md
+++ b/files/es/web/javascript/reference/operators/conditional_operator/index.md
@@ -40,8 +40,8 @@ var firstCheck = false,
access = firstCheck
? "Acceso Denegado"
: secondCheck
- ? "Acceso Denegado"
- : "Acceso Permitido";
+ ? "Acceso Denegado"
+ : "Acceso Permitido";
console.log(access); // muestra "Acceso Permitido"
```
diff --git a/files/es/web/javascript/reference/template_literals/index.md b/files/es/web/javascript/reference/template_literals/index.md
index 2848f6cb4e9e43..51ff68a0e63951 100644
--- a/files/es/web/javascript/reference/template_literals/index.md
+++ b/files/es/web/javascript/reference/template_literals/index.md
@@ -93,8 +93,8 @@ let classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
En ES2015 con plantillas literales y sin anidamiento:
diff --git a/files/fr/glossary/base64/index.md b/files/fr/glossary/base64/index.md
index 82caf543ab9146..5cf95352509959 100644
--- a/files/fr/glossary/base64/index.md
+++ b/files/fr/glossary/base64/index.md
@@ -85,14 +85,14 @@ function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
? nChr - 65
: nChr > 96 && nChr < 123
- ? nChr - 71
- : nChr > 47 && nChr < 58
- ? nChr + 4
- : nChr === 43
- ? 62
- : nChr === 47
- ? 63
- : 0;
+ ? nChr - 71
+ : nChr > 47 && nChr < 58
+ ? nChr + 4
+ : nChr === 43
+ ? 62
+ : nChr === 47
+ ? 63
+ : 0;
}
function base64DecToArr(sBase64, nBlocksSize) {
@@ -130,14 +130,14 @@ function uint6ToB64(nUint6) {
return nUint6 < 26
? nUint6 + 65
: nUint6 < 52
- ? nUint6 + 71
- : nUint6 < 62
- ? nUint6 - 4
- : nUint6 === 62
- ? 43
- : nUint6 === 63
- ? 47
- : 65;
+ ? nUint6 + 71
+ : nUint6 < 62
+ ? nUint6 - 4
+ : nUint6 === 62
+ ? 43
+ : nUint6 === 63
+ ? 47
+ : 65;
}
function base64EncArr(aBytes) {
@@ -187,27 +187,27 @@ function UTF8ArrToStr(aBytes) {
aBytes[++nIdx] -
128
: nPart > 247 && nPart < 252 && nIdx + 4 < nLen /* cinq octets */
- ? ((nPart - 248) << 24) +
- ((aBytes[++nIdx] - 128) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* quatre octets */
- ? ((nPart - 240) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* trois octets */
- ? ((nPart - 224) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* deux octets */
- ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
- : /* nPart < 127 ? */ /* un octet */
- nPart,
+ ? ((nPart - 248) << 24) +
+ ((aBytes[++nIdx] - 128) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* quatre octets */
+ ? ((nPart - 240) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* trois octets */
+ ? ((nPart - 224) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* deux octets */
+ ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
+ : /* nPart < 127 ? */ /* un octet */
+ nPart,
);
}
return sView;
@@ -229,14 +229,14 @@ function strToUTF8Arr(sDOMStr) {
nChr < 0x80
? 1
: nChr < 0x800
- ? 2
- : nChr < 0x10000
- ? 3
- : nChr < 0x200000
- ? 4
- : nChr < 0x4000000
- ? 5
- : 6;
+ ? 2
+ : nChr < 0x10000
+ ? 3
+ : nChr < 0x200000
+ ? 4
+ : nChr < 0x4000000
+ ? 5
+ : 6;
}
aBytes = new Uint8Array(nArrLen);
diff --git a/files/fr/learn/javascript/asynchronous/introducing/index.md b/files/fr/learn/javascript/asynchronous/introducing/index.md
index 3342e96a33e36f..6e8573a40104e4 100644
--- a/files/fr/learn/javascript/asynchronous/introducing/index.md
+++ b/files/fr/learn/javascript/asynchronous/introducing/index.md
@@ -109,9 +109,8 @@ function genererNbPremiers(quota) {
document.querySelector("#generer").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const nbPremiers = genererNbPremiers(quota);
- document.querySelector(
- "#output",
- ).textContent = `Génération de ${quota} nombres premiers terminée !`;
+ document.querySelector("#output").textContent =
+ `Génération de ${quota} nombres premiers terminée !`;
});
document.querySelector("#recharger").addEventListener("click", () => {
@@ -177,9 +176,8 @@ function genererNbPremiers(quota) {
document.querySelector("#generer").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const nbPremiers = genererNbPremiers(quota);
- document.querySelector(
- "#output",
- ).textContent = `Génération de ${quota} nombres premiers terminée !`;
+ document.querySelector("#output").textContent =
+ `Génération de ${quota} nombres premiers terminée !`;
});
document.querySelector("#recharger").addEventListener("click", () => {
diff --git a/files/fr/learn/javascript/asynchronous/introducing_workers/index.md b/files/fr/learn/javascript/asynchronous/introducing_workers/index.md
index ce7db56390a489..22e9ff263ec540 100644
--- a/files/fr/learn/javascript/asynchronous/introducing_workers/index.md
+++ b/files/fr/learn/javascript/asynchronous/introducing_workers/index.md
@@ -75,9 +75,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Génération de ${quota} nombres premiers terminée !`;
+ document.querySelector("#output").textContent =
+ `Génération de ${quota} nombres premiers terminée !`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -159,9 +158,8 @@ document.querySelector("#generate").addEventListener("click", () => {
// du message, on met à jour la zone de sortie avec un texte, indiquant aussi
// le quantité de nombres premiers générés.
worker.addEventListener("message", (message) => {
- document.querySelector(
- "#output",
- ).textContent = `Génération de ${message.data} nombres premiers terminée !`;
+ document.querySelector("#output").textContent =
+ `Génération de ${message.data} nombres premiers terminée !`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git a/files/fr/web/api/event/eventphase/index.md b/files/fr/web/api/event/eventphase/index.md
index fc8cf355431362..7d99b98fdfc4ba 100644
--- a/files/fr/web/api/event/eventphase/index.md
+++ b/files/fr/web/api/event/eventphase/index.md
@@ -122,12 +122,12 @@ function onDivClick(e) {
e.eventPhase == 0
? "none"
: e.eventPhase == 1
- ? "capturing"
- : e.eventPhase == 2
- ? "target"
- : e.eventPhase == 3
- ? "bubbling"
- : "error";
+ ? "capturing"
+ : e.eventPhase == 2
+ ? "target"
+ : e.eventPhase == 3
+ ? "bubbling"
+ : "error";
const para = document.createElement("p");
para.textContent = `${e.currentTarget.id}; eventPhase: ${level}`;
divInfo.appendChild(para);
diff --git a/files/fr/web/api/gamepad_api/using_the_gamepad_api/index.md b/files/fr/web/api/gamepad_api/using_the_gamepad_api/index.md
index 2a496bc0126567..42c79ff71c4a41 100644
--- a/files/fr/web/api/gamepad_api/using_the_gamepad_api/index.md
+++ b/files/fr/web/api/gamepad_api/using_the_gamepad_api/index.md
@@ -190,8 +190,8 @@ function pollGamepads() {
let gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads
- : [];
+ ? navigator.webkitGetGamepads
+ : [];
for (let i = 0; i < gamepads.length; i++) {
let gp = gamepads[i];
if (gp) {
@@ -228,8 +228,8 @@ function gameLoop() {
let gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads()
- : [];
+ ? navigator.webkitGetGamepads()
+ : [];
if (!gamepads) {
return;
}
@@ -369,8 +369,8 @@ function scangamepads() {
let gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads()
- : [];
+ ? navigator.webkitGetGamepads()
+ : [];
for (let i = 0; i < gamepads.length; i++) {
if (gamepads[i]) {
if (gamepads[i].index in controllers) {
diff --git a/files/fr/web/api/history_api/example/index.md b/files/fr/web/api/history_api/example/index.md
index be61758c27f430..654cea4fc2cab7 100644
--- a/files/fr/web/api/history_api/example/index.md
+++ b/files/fr/web/api/history_api/example/index.md
@@ -417,8 +417,8 @@ const ajaxRequest = new (function () {
window.addEventListener
? addEventListener("load", init, false)
: window.attachEvent
- ? attachEvent("onload", init)
- : (onload = init);
+ ? attachEvent("onload", init)
+ : (onload = init);
// Public methods
diff --git a/files/fr/web/api/window/scrolly/index.md b/files/fr/web/api/window/scrolly/index.md
index 1ddb553a2ea472..a9590b81cc8455 100644
--- a/files/fr/web/api/window/scrolly/index.md
+++ b/files/fr/web/api/window/scrolly/index.md
@@ -45,13 +45,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## Spécifications
diff --git a/files/fr/web/html/element/marquee/index.md b/files/fr/web/html/element/marquee/index.md
index 9b4aa68add2e20..795580e28a2392 100644
--- a/files/fr/web/html/element/marquee/index.md
+++ b/files/fr/web/html/element/marquee/index.md
@@ -63,7 +63,7 @@ L'élément HTML **`
```
diff --git a/files/fr/web/javascript/reference/global_objects/proxy/index.md b/files/fr/web/javascript/reference/global_objects/proxy/index.md
index 83636295749d1f..e4051941b824fb 100644
--- a/files/fr/web/javascript/reference/global_objects/proxy/index.md
+++ b/files/fr/web/javascript/reference/global_objects/proxy/index.md
@@ -426,7 +426,7 @@ var docCookies = new Proxy(docCookies, {
return oTarget.setItem(sKey, vValue);
},
deleteProperty: function (oTarget, sKey) {
- if (!sKey in oTarget) {
+ if ((!sKey) in oTarget) {
return false;
}
return oTarget.removeItem(sKey);
diff --git a/files/fr/web/javascript/reference/operators/conditional_operator/index.md b/files/fr/web/javascript/reference/operators/conditional_operator/index.md
index 921414a28f201f..29d1d3e538a3ae 100644
--- a/files/fr/web/javascript/reference/operators/conditional_operator/index.md
+++ b/files/fr/web/javascript/reference/operators/conditional_operator/index.md
@@ -46,8 +46,8 @@ var premierControle = false,
acces = premierControle
? "Accès refusé"
: secondControle
- ? "Accès refusé"
- : "Accès autorisé";
+ ? "Accès refusé"
+ : "Accès autorisé";
console.log(acces); // "Accès autorisé"
```
diff --git a/files/fr/web/javascript/reference/operators/import/index.md b/files/fr/web/javascript/reference/operators/import/index.md
index afc7878051fabe..5391e13fac3fc8 100644
--- a/files/fr/web/javascript/reference/operators/import/index.md
+++ b/files/fr/web/javascript/reference/operators/import/index.md
@@ -117,8 +117,8 @@ Ici, on charge 10 modules, `/modules/module-0.js`, `/modules/module-1.js`, etc.,
```js
Promise.all(
- Array.from({ length: 10 }).map((_, index) =>
- import(`/modules/module-${index}.js`),
+ Array.from({ length: 10 }).map(
+ (_, index) => import(`/modules/module-${index}.js`),
),
).then((modules) => modules.forEach((module) => module.load()));
```
diff --git a/files/fr/web/javascript/reference/template_literals/index.md b/files/fr/web/javascript/reference/template_literals/index.md
index bf9d8c477e2a13..9c3c54aa8c983f 100644
--- a/files/fr/web/javascript/reference/template_literals/index.md
+++ b/files/fr/web/javascript/reference/template_literals/index.md
@@ -100,8 +100,8 @@ let classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
En ES2015 avec des gabarits et sans imbrication :
diff --git a/files/ja/glossary/base64/index.md b/files/ja/glossary/base64/index.md
index 42cec2fb3ee344..2e361de101017a 100644
--- a/files/ja/glossary/base64/index.md
+++ b/files/ja/glossary/base64/index.md
@@ -82,14 +82,14 @@ function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
? nChr - 65
: nChr > 96 && nChr < 123
- ? nChr - 71
- : nChr > 47 && nChr < 58
- ? nChr + 4
- : nChr === 43
- ? 62
- : nChr === 47
- ? 63
- : 0;
+ ? nChr - 71
+ : nChr > 47 && nChr < 58
+ ? nChr + 4
+ : nChr === 43
+ ? 62
+ : nChr === 47
+ ? 63
+ : 0;
}
function base64DecToArr(sBase64, nBlocksSize) {
@@ -126,14 +126,14 @@ function uint6ToB64(nUint6) {
return nUint6 < 26
? nUint6 + 65
: nUint6 < 52
- ? nUint6 + 71
- : nUint6 < 62
- ? nUint6 - 4
- : nUint6 === 62
- ? 43
- : nUint6 === 63
- ? 47
- : 65;
+ ? nUint6 + 71
+ : nUint6 < 62
+ ? nUint6 - 4
+ : nUint6 === 62
+ ? 43
+ : nUint6 === 63
+ ? 47
+ : 65;
}
function base64EncArr(aBytes) {
@@ -184,27 +184,27 @@ function UTF8ArrToStr(aBytes) {
aBytes[++nIdx] -
128
: nPart > 247 && nPart < 252 && nIdx + 4 < nLen /* five bytes */
- ? ((nPart - 248) << 24) +
- ((aBytes[++nIdx] - 128) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
- ? ((nPart - 240) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
- ? ((nPart - 224) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
- ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
- : /* nPart < 127 ? */ /* one byte */
- nPart,
+ ? ((nPart - 248) << 24) +
+ ((aBytes[++nIdx] - 128) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
+ ? ((nPart - 240) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
+ ? ((nPart - 224) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
+ ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
+ : /* nPart < 127 ? */ /* one byte */
+ nPart,
);
}
return sView;
@@ -228,14 +228,14 @@ function strToUTF8Arr(sDOMStr) {
nChr < 0x80
? 1
: nChr < 0x800
- ? 2
- : nChr < 0x10000
- ? 3
- : nChr < 0x200000
- ? 4
- : nChr < 0x4000000
- ? 5
- : 6;
+ ? 2
+ : nChr < 0x10000
+ ? 3
+ : nChr < 0x200000
+ ? 4
+ : nChr < 0x4000000
+ ? 5
+ : 6;
}
aBytes = new Uint8Array(nArrLen);
diff --git a/files/ja/learn/javascript/asynchronous/introducing_workers/index.md b/files/ja/learn/javascript/asynchronous/introducing_workers/index.md
index b76bd82b4abe99..ea29447f095df1 100644
--- a/files/ja/learn/javascript/asynchronous/introducing_workers/index.md
+++ b/files/ja/learn/javascript/asynchronous/introducing_workers/index.md
@@ -75,9 +75,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${quota} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -160,9 +159,8 @@ document.querySelector("#generate").addEventListener("click", () => {
// データから受け取った生成された素数の個数を含むユーザーへの
// メッセージで出力ボックスを更新します。
worker.addEventListener("message", (message) => {
- document.querySelector(
- "#output",
- ).textContent = `${message.data} 個の素数を生成しました。`;
+ document.querySelector("#output").textContent =
+ `${message.data} 個の素数を生成しました。`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git a/files/ja/web/api/keyboardevent/metakey/index.md b/files/ja/web/api/keyboardevent/metakey/index.md
index a56adecfc2a356..cbbfe08ce929e7 100644
--- a/files/ja/web/api/keyboardevent/metakey/index.md
+++ b/files/ja/web/api/keyboardevent/metakey/index.md
@@ -27,9 +27,8 @@ l10n:
```js
function ismetaKey(e) {
- document.querySelector(
- "#output",
- ).textContent = `metaKey pressed? ${e.metaKey}`;
+ document.querySelector("#output").textContent =
+ `metaKey pressed? ${e.metaKey}`;
}
```
diff --git a/files/ja/web/api/response/json/index.md b/files/ja/web/api/response/json/index.md
index 4c2c7ae1ff80fd..73cc73da1199d2 100644
--- a/files/ja/web/api/response/json/index.md
+++ b/files/ja/web/api/response/json/index.md
@@ -41,9 +41,8 @@ fetch(myRequest)
listItem.appendChild(document.createElement("strong")).textContent =
product.Name;
listItem.append(` can be found in ${product.Location}. Cost: `);
- listItem.appendChild(
- document.createElement("strong"),
- ).textContent = `£${product.Price}`;
+ listItem.appendChild(document.createElement("strong")).textContent =
+ `£${product.Price}`;
myList.appendChild(listItem);
}
})
diff --git a/files/ja/web/api/window/scrolly/index.md b/files/ja/web/api/window/scrolly/index.md
index c96888cc46622b..3d41a8e28f911f 100644
--- a/files/ja/web/api/window/scrolly/index.md
+++ b/files/ja/web/api/window/scrolly/index.md
@@ -51,13 +51,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## 仕様書
diff --git a/files/ja/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/ja/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
index 9dc34cab9069ee..0ec763ffda31df 100644
--- a/files/ja/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
+++ b/files/ja/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
@@ -336,8 +336,8 @@ html {{ HTMLElement("form") }} は、次の4つの方法で送ることがで
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = target.action;
this.status = 0;
diff --git a/files/ja/web/html/element/marquee/index.md b/files/ja/web/html/element/marquee/index.md
index 72965fad2a8a75..95487c33b90faa 100644
--- a/files/ja/web/html/element/marquee/index.md
+++ b/files/ja/web/html/element/marquee/index.md
@@ -63,7 +63,7 @@ l10n:
height="200"
behavior="alternate"
style="border:solid">
- This text will bounce
+ This text will bounce
```
diff --git a/files/ja/web/javascript/reference/global_objects/math/hypot/index.md b/files/ja/web/javascript/reference/global_objects/math/hypot/index.md
index 61113d78ff533b..96fdd60de97c19 100644
--- a/files/ja/web/javascript/reference/global_objects/math/hypot/index.md
+++ b/files/ja/web/javascript/reference/global_objects/math/hypot/index.md
@@ -94,8 +94,8 @@ if (!Math.hypot)
return containsInfinity
? Infinity
: max === 1 / 0
- ? 1 / 0
- : max * Math.sqrt(s);
+ ? 1 / 0
+ : max * Math.sqrt(s);
};
```
diff --git a/files/ja/web/javascript/reference/operators/import/index.md b/files/ja/web/javascript/reference/operators/import/index.md
index a5333ba46400f4..8e92e5d37b9264 100644
--- a/files/ja/web/javascript/reference/operators/import/index.md
+++ b/files/ja/web/javascript/reference/operators/import/index.md
@@ -156,8 +156,8 @@ if (typeof window === "undefined") {
```js
Promise.all(
- Array.from({ length: 10 }).map((_, index) =>
- import(`/modules/module-${index}.js`),
+ Array.from({ length: 10 }).map(
+ (_, index) => import(`/modules/module-${index}.js`),
),
).then((modules) => modules.forEach((module) => module.load()));
```
diff --git a/files/ja/web/javascript/reference/operators/typeof/index.md b/files/ja/web/javascript/reference/operators/typeof/index.md
index 9063f7a280a48e..5e52782e3ef742 100644
--- a/files/ja/web/javascript/reference/operators/typeof/index.md
+++ b/files/ja/web/javascript/reference/operators/typeof/index.md
@@ -210,8 +210,8 @@ function type(obj, fullClass) {
)
? deepType
: typeof obj === "object" || typeof obj === "function"
- ? "object"
- : typeof obj;
+ ? "object"
+ : typeof obj;
}
```
diff --git a/files/ja/web/javascript/reference/template_literals/index.md b/files/ja/web/javascript/reference/template_literals/index.md
index 2f6232593dd0dd..69c635d7ef9199 100644
--- a/files/ja/web/javascript/reference/template_literals/index.md
+++ b/files/ja/web/javascript/reference/template_literals/index.md
@@ -99,8 +99,8 @@ let classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
ES2015 で入れ子なしのテンプレートリテラルの場合:
diff --git a/files/ko/learn/javascript/asynchronous/introducing/index.md b/files/ko/learn/javascript/asynchronous/introducing/index.md
index 05b6ae3dc2d329..5796eb3bebdb87 100644
--- a/files/ko/learn/javascript/asynchronous/introducing/index.md
+++ b/files/ko/learn/javascript/asynchronous/introducing/index.md
@@ -115,9 +115,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${quota} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -183,9 +182,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${quota} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git a/files/ko/learn/javascript/asynchronous/introducing_workers/index.md b/files/ko/learn/javascript/asynchronous/introducing_workers/index.md
index bbd79fb51dc0b2..c9b1e44ca599d0 100644
--- a/files/ko/learn/javascript/asynchronous/introducing_workers/index.md
+++ b/files/ko/learn/javascript/asynchronous/introducing_workers/index.md
@@ -73,9 +73,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${quota} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -155,9 +154,8 @@ document.querySelector("#generate").addEventListener("click", () => {
// update the output box with a message for the user, including the number of
// primes that were generated, taken from the message data.
worker.addEventListener("message", (message) => {
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${message.data} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${message.data} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git a/files/ko/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md b/files/ko/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
index c795d2bbdac4b8..590445f3c08a36 100644
--- a/files/ko/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
+++ b/files/ko/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
@@ -389,8 +389,8 @@ Svelte 컴파일러는 배후에서 종속성 트리를 만들기 위해 코드
filter === "active"
? todos.filter((t) => !t.completed)
: filter === "completed"
- ? todos.filter((t) => t.completed)
- : todos;
+ ? todos.filter((t) => t.completed)
+ : todos;
```
활성 필터(_all_, _active_ 또는 _completed_)를 제어하기 위해 `filter` 변수를 사용합니다. 이 값 중 하나를 필터 변수에 할당하기만 하면 필터가 활성화되고 할 일 목록이 업데이트됩니다. 이를 달성하는 방법을 살펴보겠습니다.
diff --git a/files/ko/web/api/event/eventphase/index.md b/files/ko/web/api/event/eventphase/index.md
index 196fd44acb7c0e..aafc91dee08d6f 100644
--- a/files/ko/web/api/event/eventphase/index.md
+++ b/files/ko/web/api/event/eventphase/index.md
@@ -121,12 +121,12 @@ function OnDivClick(e) {
e.eventPhase == 0
? "없음"
: e.eventPhase == 1
- ? "캡처"
- : e.eventPhase == 2
- ? "대상"
- : e.eventPhase == 3
- ? "버블"
- : "오류";
+ ? "캡처"
+ : e.eventPhase == 2
+ ? "대상"
+ : e.eventPhase == 3
+ ? "버블"
+ : "오류";
const p = document.createElement("p");
p.textContent = `${e.currentTarget.id}; eventPhase: ${level}`;
divInfo.appendChild(p);
diff --git a/files/ko/web/api/webgl_api/by_example/hello_glsl/index.md b/files/ko/web/api/webgl_api/by_example/hello_glsl/index.md
index 9a80f0b1939121..1bde24956b3b8d 100644
--- a/files/ko/web/api/webgl_api/by_example/hello_glsl/index.md
+++ b/files/ko/web/api/webgl_api/by_example/hello_glsl/index.md
@@ -98,9 +98,8 @@ function setupWebGL(evt) {
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const linkErrLog = gl.getProgramInfoLog(program);
cleanup();
- document.querySelector(
- "p",
- ).textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`;
+ document.querySelector("p").textContent =
+ `Shader program did not link successfully. Error log: ${linkErrLog}`;
return;
}
diff --git a/files/ko/web/api/window/scrollx/index.md b/files/ko/web/api/window/scrollx/index.md
index 759df46f8dc401..eed5a0c12950b8 100644
--- a/files/ko/web/api/window/scrollx/index.md
+++ b/files/ko/web/api/window/scrollx/index.md
@@ -48,13 +48,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## 명세
diff --git a/files/ko/web/api/window/scrolly/index.md b/files/ko/web/api/window/scrolly/index.md
index 9ab4c73f1dc9d2..54fd068e3b23c3 100644
--- a/files/ko/web/api/window/scrolly/index.md
+++ b/files/ko/web/api/window/scrolly/index.md
@@ -51,13 +51,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## 명세
diff --git a/files/ko/web/javascript/reference/template_literals/index.md b/files/ko/web/javascript/reference/template_literals/index.md
index 90256322b86b9c..e233382a34e97d 100644
--- a/files/ko/web/javascript/reference/template_literals/index.md
+++ b/files/ko/web/javascript/reference/template_literals/index.md
@@ -83,8 +83,8 @@ var classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
ES2015에서 중첩(nesting)없이 템플릿 리터럴 사용한 경우:
diff --git a/files/pt-br/glossary/base64/index.md b/files/pt-br/glossary/base64/index.md
index 6b6a3f84d4ed84..f3c5a68788bc03 100644
--- a/files/pt-br/glossary/base64/index.md
+++ b/files/pt-br/glossary/base64/index.md
@@ -78,14 +78,14 @@ function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
? nChr - 65
: nChr > 96 && nChr < 123
- ? nChr - 71
- : nChr > 47 && nChr < 58
- ? nChr + 4
- : nChr === 43
- ? 62
- : nChr === 47
- ? 63
- : 0;
+ ? nChr - 71
+ : nChr > 47 && nChr < 58
+ ? nChr + 4
+ : nChr === 43
+ ? 62
+ : nChr === 47
+ ? 63
+ : 0;
}
function base64DecToArr(sBase64, nBlocksSize) {
@@ -122,14 +122,14 @@ function uint6ToB64(nUint6) {
return nUint6 < 26
? nUint6 + 65
: nUint6 < 52
- ? nUint6 + 71
- : nUint6 < 62
- ? nUint6 - 4
- : nUint6 === 62
- ? 43
- : nUint6 === 63
- ? 47
- : 65;
+ ? nUint6 + 71
+ : nUint6 < 62
+ ? nUint6 - 4
+ : nUint6 === 62
+ ? 43
+ : nUint6 === 63
+ ? 47
+ : 65;
}
function base64EncArr(aBytes) {
@@ -180,27 +180,27 @@ function UTF8ArrToStr(aBytes) {
aBytes[++nIdx] -
128
: nPart > 247 && nPart < 252 && nIdx + 4 < nLen /* five bytes */
- ? ((nPart - 248) << 24) +
- ((aBytes[++nIdx] - 128) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
- ? ((nPart - 240) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
- ? ((nPart - 224) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
- ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
- : /* nPart < 127 ? */ /* one byte */
- nPart,
+ ? ((nPart - 248) << 24) +
+ ((aBytes[++nIdx] - 128) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
+ ? ((nPart - 240) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
+ ? ((nPart - 224) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
+ ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
+ : /* nPart < 127 ? */ /* one byte */
+ nPart,
);
}
return sView;
@@ -224,14 +224,14 @@ function strToUTF8Arr(sDOMStr) {
nChr < 0x80
? 1
: nChr < 0x800
- ? 2
- : nChr < 0x10000
- ? 3
- : nChr < 0x200000
- ? 4
- : nChr < 0x4000000
- ? 5
- : 6;
+ ? 2
+ : nChr < 0x10000
+ ? 3
+ : nChr < 0x200000
+ ? 4
+ : nChr < 0x4000000
+ ? 5
+ : 6;
}
aBytes = new Uint8Array(nArrLen);
diff --git a/files/pt-br/web/api/history_api/example/index.md b/files/pt-br/web/api/history_api/example/index.md
index 248c61f13c0be8..d4b4299294b7a1 100644
--- a/files/pt-br/web/api/history_api/example/index.md
+++ b/files/pt-br/web/api/history_api/example/index.md
@@ -421,8 +421,8 @@ const ajaxRequest = new (function () {
window.addEventListener
? addEventListener("load", init, false)
: window.attachEvent
- ? attachEvent("onload", init)
- : (onload = init);
+ ? attachEvent("onload", init)
+ : (onload = init);
// Public methods
diff --git a/files/pt-br/web/api/window/scrolly/index.md b/files/pt-br/web/api/window/scrolly/index.md
index 75e7c2e22dec91..6c2f0778a264e8 100644
--- a/files/pt-br/web/api/window/scrolly/index.md
+++ b/files/pt-br/web/api/window/scrolly/index.md
@@ -49,13 +49,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## Especificações
diff --git a/files/pt-br/web/api/xmlhttprequest/using_xmlhttprequest/index.md b/files/pt-br/web/api/xmlhttprequest/using_xmlhttprequest/index.md
index beb6f43a4f475b..c1deef22c8db15 100644
--- a/files/pt-br/web/api/xmlhttprequest/using_xmlhttprequest/index.md
+++ b/files/pt-br/web/api/xmlhttprequest/using_xmlhttprequest/index.md
@@ -362,8 +362,8 @@ All these things are done automatically by the web browser whenever you submit a
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = oTarget.action;
this.status = 0;
diff --git a/files/pt-br/web/javascript/reference/operators/conditional_operator/index.md b/files/pt-br/web/javascript/reference/operators/conditional_operator/index.md
index 61b7b839c3ae8d..56f551eaed79ad 100644
--- a/files/pt-br/web/javascript/reference/operators/conditional_operator/index.md
+++ b/files/pt-br/web/javascript/reference/operators/conditional_operator/index.md
@@ -44,8 +44,8 @@ var firstCheck = false,
access = firstCheck
? "Access denied"
: secondCheck
- ? "Access denied"
- : "Access granted";
+ ? "Access denied"
+ : "Access granted";
console.log(access); // logs "Access granted"
```
diff --git a/files/ru/web/api/gamepad_api/using_the_gamepad_api/index.md b/files/ru/web/api/gamepad_api/using_the_gamepad_api/index.md
index 60047eb502350b..51bd968f390a0e 100644
--- a/files/ru/web/api/gamepad_api/using_the_gamepad_api/index.md
+++ b/files/ru/web/api/gamepad_api/using_the_gamepad_api/index.md
@@ -175,8 +175,8 @@ function pollGamepads() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads
- : [];
+ ? navigator.webkitGetGamepads
+ : [];
for (var i = 0; i < gamepads.length; i++) {
var gp = gamepads[i];
if (gp) {
@@ -213,8 +213,8 @@ function gameLoop() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads
- : [];
+ ? navigator.webkitGetGamepads
+ : [];
if (!gamepads) {
return;
}
@@ -354,8 +354,8 @@ function scangamepads() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads()
- : [];
+ ? navigator.webkitGetGamepads()
+ : [];
for (var i = 0; i < gamepads.length; i++) {
if (gamepads[i]) {
if (gamepads[i].index in controllers) {
diff --git a/files/ru/web/api/window/scrolly/index.md b/files/ru/web/api/window/scrolly/index.md
index 9469eb195fa2a8..34ea7ee0ac34c0 100644
--- a/files/ru/web/api/window/scrolly/index.md
+++ b/files/ru/web/api/window/scrolly/index.md
@@ -51,13 +51,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## Спецификации
diff --git a/files/ru/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/ru/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
index b002d8aa23705c..72622aab9eba78 100644
--- a/files/ru/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
+++ b/files/ru/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
@@ -335,8 +335,8 @@ HTML-форму {{ HTMLElement("form") }} можно отправить четы
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = target.action;
this.status = 0;
diff --git a/files/ru/web/html/element/marquee/index.md b/files/ru/web/html/element/marquee/index.md
index 969aef90ca448d..172408ecf93d5f 100644
--- a/files/ru/web/html/element/marquee/index.md
+++ b/files/ru/web/html/element/marquee/index.md
@@ -63,7 +63,7 @@ HTML-элемент `` используется для создания
height="200"
behavior="alternate"
style="border:solid">
- This text will bounce
+ This text will bounce
```
diff --git a/files/ru/web/javascript/reference/global_objects/array/reduceright/index.md b/files/ru/web/javascript/reference/global_objects/array/reduceright/index.md
index 59ece6a03553e4..50b916b522a4b2 100644
--- a/files/ru/web/javascript/reference/global_objects/array/reduceright/index.md
+++ b/files/ru/web/javascript/reference/global_objects/array/reduceright/index.md
@@ -141,7 +141,7 @@ if ("function" !== typeof Array.prototype.reduceRight) {
if (arguments.length >= 2) {
value = arguments[1];
} else {
- while (k >= 0 && !k in t) {
+ while (k >= 0 && (!k) in t) {
k--;
}
if (k < 0) {
diff --git a/files/ru/web/javascript/reference/operators/conditional_operator/index.md b/files/ru/web/javascript/reference/operators/conditional_operator/index.md
index 41c0e315b789cc..a5031917104646 100644
--- a/files/ru/web/javascript/reference/operators/conditional_operator/index.md
+++ b/files/ru/web/javascript/reference/operators/conditional_operator/index.md
@@ -54,8 +54,8 @@ const secondCheck = false;
const access = firstCheck
? "Доступ запрещён"
: secondCheck
- ? "Доступ запрещён"
- : "Доступ разрешён";
+ ? "Доступ запрещён"
+ : "Доступ разрешён";
console.log(access); // выводит в консоль "Доступ разрешён"
```
diff --git a/files/ru/web/javascript/reference/template_literals/index.md b/files/ru/web/javascript/reference/template_literals/index.md
index 75762f11c9d267..004981b42aba26 100644
--- a/files/ru/web/javascript/reference/template_literals/index.md
+++ b/files/ru/web/javascript/reference/template_literals/index.md
@@ -78,8 +78,8 @@ var classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
В ES2015 с шаблонными литералами без вложения:
diff --git a/files/zh-cn/glossary/base64/index.md b/files/zh-cn/glossary/base64/index.md
index 7c79507dabccf5..e05b45ead1e32d 100644
--- a/files/zh-cn/glossary/base64/index.md
+++ b/files/zh-cn/glossary/base64/index.md
@@ -79,14 +79,14 @@ function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
? nChr - 65
: nChr > 96 && nChr < 123
- ? nChr - 71
- : nChr > 47 && nChr < 58
- ? nChr + 4
- : nChr === 43
- ? 62
- : nChr === 47
- ? 63
- : 0;
+ ? nChr - 71
+ : nChr > 47 && nChr < 58
+ ? nChr + 4
+ : nChr === 43
+ ? 62
+ : nChr === 47
+ ? 63
+ : 0;
}
function base64DecToArr(sBase64, nBlocksSize) {
@@ -123,14 +123,14 @@ function uint6ToB64(nUint6) {
return nUint6 < 26
? nUint6 + 65
: nUint6 < 52
- ? nUint6 + 71
- : nUint6 < 62
- ? nUint6 - 4
- : nUint6 === 62
- ? 43
- : nUint6 === 63
- ? 47
- : 65;
+ ? nUint6 + 71
+ : nUint6 < 62
+ ? nUint6 - 4
+ : nUint6 === 62
+ ? 43
+ : nUint6 === 63
+ ? 47
+ : 65;
}
function base64EncArr(aBytes) {
@@ -182,27 +182,27 @@ function UTF8ArrToStr(aBytes) {
aBytes[++nIdx] -
128
: nPart > 247 && nPart < 252 && nIdx + 4 < nLen /* five bytes */
- ? ((nPart - 248) << 24) +
- ((aBytes[++nIdx] - 128) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
- ? ((nPart - 240) << 18) +
- ((aBytes[++nIdx] - 128) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
- ? ((nPart - 224) << 12) +
- ((aBytes[++nIdx] - 128) << 6) +
- aBytes[++nIdx] -
- 128
- : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
- ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
- : /* nPart < 127 ? */ /* one byte */
- nPart,
+ ? ((nPart - 248) << 24) +
+ ((aBytes[++nIdx] - 128) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 239 && nPart < 248 && nIdx + 3 < nLen /* four bytes */
+ ? ((nPart - 240) << 18) +
+ ((aBytes[++nIdx] - 128) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 223 && nPart < 240 && nIdx + 2 < nLen /* three bytes */
+ ? ((nPart - 224) << 12) +
+ ((aBytes[++nIdx] - 128) << 6) +
+ aBytes[++nIdx] -
+ 128
+ : nPart > 191 && nPart < 224 && nIdx + 1 < nLen /* two bytes */
+ ? ((nPart - 192) << 6) + aBytes[++nIdx] - 128
+ : /* nPart < 127 ? */ /* one byte */
+ nPart,
);
}
return sView;
@@ -226,14 +226,14 @@ function strToUTF8Arr(sDOMStr) {
nChr < 0x80
? 1
: nChr < 0x800
- ? 2
- : nChr < 0x10000
- ? 3
- : nChr < 0x200000
- ? 4
- : nChr < 0x4000000
- ? 5
- : 6;
+ ? 2
+ : nChr < 0x10000
+ ? 3
+ : nChr < 0x200000
+ ? 4
+ : nChr < 0x4000000
+ ? 5
+ : 6;
}
aBytes = new Uint8Array(nArrLen);
diff --git a/files/zh-cn/learn/javascript/asynchronous/introducing/index.md b/files/zh-cn/learn/javascript/asynchronous/introducing/index.md
index 810e67c9acb045..30d65bc8b50905 100644
--- a/files/zh-cn/learn/javascript/asynchronous/introducing/index.md
+++ b/files/zh-cn/learn/javascript/asynchronous/introducing/index.md
@@ -110,9 +110,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `完成!已生成素数${quota}个。`;
+ document.querySelector("#output").textContent =
+ `完成!已生成素数${quota}个。`;
});
document.querySelector("#reload").addEventListener("click", () => {
document.location.reload();
@@ -170,9 +169,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `完成!已生成素数${quota}个。`;
+ document.querySelector("#output").textContent =
+ `完成!已生成素数${quota}个。`;
});
document.querySelector("#reload").addEventListener("click", () => {
document.querySelector("#user-input").value =
diff --git a/files/zh-cn/learn/javascript/asynchronous/introducing_workers/index.md b/files/zh-cn/learn/javascript/asynchronous/introducing_workers/index.md
index d20af94db63d5c..bec3222dd82bb2 100644
--- a/files/zh-cn/learn/javascript/asynchronous/introducing_workers/index.md
+++ b/files/zh-cn/learn/javascript/asynchronous/introducing_workers/index.md
@@ -74,9 +74,8 @@ function generatePrimes(quota) {
document.querySelector("#generate").addEventListener("click", () => {
const quota = document.querySelector("#quota").value;
const primes = generatePrimes(quota);
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${quota} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${quota} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
@@ -153,9 +152,8 @@ document.querySelector("#generate").addEventListener("click", () => {
// 当 worker 给主线程回发一条消息时,为用户更新 output 框,包含生成的质数(从 message 中获取)。
worker.addEventListener("message", (message) => {
- document.querySelector(
- "#output",
- ).textContent = `Finished generating ${message.data} primes!`;
+ document.querySelector("#output").textContent =
+ `Finished generating ${message.data} primes!`;
});
document.querySelector("#reload").addEventListener("click", () => {
diff --git a/files/zh-cn/web/api/document/createtreewalker/index.md b/files/zh-cn/web/api/document/createtreewalker/index.md
index d85b6abbf1fb67..18b4062c726015 100644
--- a/files/zh-cn/web/api/document/createtreewalker/index.md
+++ b/files/zh-cn/web/api/document/createtreewalker/index.md
@@ -149,8 +149,8 @@ const treeWalker = document.createTreeWalker(
node.classList.contains("no-escape")
? NodeFilter.FILTER_REJECT
: node.closest(".escape")
- ? NodeFilter.FILTER_ACCEPT
- : NodeFilter.FILTER_SKIP,
+ ? NodeFilter.FILTER_ACCEPT
+ : NodeFilter.FILTER_SKIP,
);
while (treeWalker.nextNode()) {
diff --git a/files/zh-cn/web/api/domexception/domexception/index.md b/files/zh-cn/web/api/domexception/domexception/index.md
index 118058b4e6da45..659b2fa399971b 100644
--- a/files/zh-cn/web/api/domexception/domexception/index.md
+++ b/files/zh-cn/web/api/domexception/domexception/index.md
@@ -49,9 +49,8 @@ button.onclick = () => {
try {
throw new DOMException("已触发自定义 DOM 异常。");
} catch (error) {
- document.querySelector(
- "#output",
- ).textContent = `错误信息:${error.message}`;
+ document.querySelector("#output").textContent =
+ `错误信息:${error.message}`;
}
};
```
diff --git a/files/zh-cn/web/api/event/eventphase/index.md b/files/zh-cn/web/api/event/eventphase/index.md
index 0eb7e3cde0144a..bb9dac2ba95e74 100644
--- a/files/zh-cn/web/api/event/eventphase/index.md
+++ b/files/zh-cn/web/api/event/eventphase/index.md
@@ -127,12 +127,12 @@ function OnDivClick(e) {
e.eventPhase == 0
? "none"
: e.eventPhase == 1
- ? "capturing"
- : e.eventPhase == 2
- ? "target"
- : e.eventPhase == 3
- ? "bubbling"
- : "error";
+ ? "capturing"
+ : e.eventPhase == 2
+ ? "target"
+ : e.eventPhase == 3
+ ? "bubbling"
+ : "error";
divInfo.innerHTML += e.currentTarget.id + "; eventPhase: " + level + "
";
}
diff --git a/files/zh-cn/web/api/gamepad_api/using_the_gamepad_api/index.md b/files/zh-cn/web/api/gamepad_api/using_the_gamepad_api/index.md
index f4a59b7ccef70d..be4b00ae8cd31b 100644
--- a/files/zh-cn/web/api/gamepad_api/using_the_gamepad_api/index.md
+++ b/files/zh-cn/web/api/gamepad_api/using_the_gamepad_api/index.md
@@ -171,8 +171,8 @@ function pollGamepads() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads
- : [];
+ ? navigator.webkitGetGamepads
+ : [];
for (var i = 0; i < gamepads.length; i++) {
var gp = gamepads[i];
if (gp) {
@@ -209,8 +209,8 @@ function gameLoop() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads
- : [];
+ ? navigator.webkitGetGamepads
+ : [];
if (!gamepads) {
return;
}
@@ -354,8 +354,8 @@ function scangamepads() {
var gamepads = navigator.getGamepads
? navigator.getGamepads()
: navigator.webkitGetGamepads
- ? navigator.webkitGetGamepads()
- : [];
+ ? navigator.webkitGetGamepads()
+ : [];
for (var i = 0; i < gamepads.length; i++) {
if (gamepads[i]) {
if (gamepads[i].index in controllers) {
diff --git a/files/zh-cn/web/api/history_api/example/index.md b/files/zh-cn/web/api/history_api/example/index.md
index 60d1c9ab5a87ed..ca922fdfb2ab4b 100644
--- a/files/zh-cn/web/api/history_api/example/index.md
+++ b/files/zh-cn/web/api/history_api/example/index.md
@@ -419,8 +419,8 @@ const ajaxRequest = new (function () {
window.addEventListener
? addEventListener("load", init, false)
: window.attachEvent
- ? attachEvent("onload", init)
- : (onload = init);
+ ? attachEvent("onload", init)
+ : (onload = init);
// Public methods
diff --git a/files/zh-cn/web/api/response/json/index.md b/files/zh-cn/web/api/response/json/index.md
index d80be00efcc1fb..5e84388666310d 100644
--- a/files/zh-cn/web/api/response/json/index.md
+++ b/files/zh-cn/web/api/response/json/index.md
@@ -37,9 +37,8 @@ fetch(myRequest)
listItem.appendChild(document.createElement("strong")).textContent =
product.Name;
listItem.append(` can be found in ${product.Location}. Cost: `);
- listItem.appendChild(
- document.createElement("strong"),
- ).textContent = `£${product.Price}`;
+ listItem.appendChild(document.createElement("strong")).textContent =
+ `£${product.Price}`;
myList.appendChild(listItem);
}
});
diff --git a/files/zh-cn/web/api/window/scrolly/index.md b/files/zh-cn/web/api/window/scrolly/index.md
index 2edda36e8adbda..81d3b094fd35c0 100644
--- a/files/zh-cn/web/api/window/scrolly/index.md
+++ b/files/zh-cn/web/api/window/scrolly/index.md
@@ -47,13 +47,13 @@ var isCSS1Compat = (document.compatMode || "") === "CSS1Compat";
var x = supportPageOffset
? window.pageXOffset
: isCSS1Compat
- ? document.documentElement.scrollLeft
- : document.body.scrollLeft;
+ ? document.documentElement.scrollLeft
+ : document.body.scrollLeft;
var y = supportPageOffset
? window.pageYOffset
: isCSS1Compat
- ? document.documentElement.scrollTop
- : document.body.scrollTop;
+ ? document.documentElement.scrollTop
+ : document.body.scrollTop;
```
## 规范
diff --git a/files/zh-cn/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/zh-cn/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
index c126c361c5cb86..6fefa59c2dd009 100644
--- a/files/zh-cn/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
+++ b/files/zh-cn/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
@@ -375,8 +375,8 @@ foo=bar&baz=The+first+line.%0D%0AThe+second+line.%0D%0A
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = oTarget.action;
this.status = 0;
diff --git a/files/zh-cn/web/html/element/marquee/index.md b/files/zh-cn/web/html/element/marquee/index.md
index 0011e3d50eae45..554d0ba4ccb199 100644
--- a/files/zh-cn/web/html/element/marquee/index.md
+++ b/files/zh-cn/web/html/element/marquee/index.md
@@ -63,7 +63,7 @@ HTML marquee 元素(``)用来插入一段滚动的文字。你可
height="200"
behavior="alternate"
style="border:solid">
- This text will bounce
+ This text will bounce
```
diff --git a/files/zh-cn/web/javascript/reference/operators/conditional_operator/index.md b/files/zh-cn/web/javascript/reference/operators/conditional_operator/index.md
index fcae2672b7929b..ad0915f3ae5901 100644
--- a/files/zh-cn/web/javascript/reference/operators/conditional_operator/index.md
+++ b/files/zh-cn/web/javascript/reference/operators/conditional_operator/index.md
@@ -61,10 +61,10 @@ function example() {
return condition1
? value1
: condition2
- ? value2
- : condition3
- ? value3
- : value4;
+ ? value2
+ : condition3
+ ? value3
+ : value4;
}
```
diff --git a/files/zh-cn/web/javascript/reference/template_literals/index.md b/files/zh-cn/web/javascript/reference/template_literals/index.md
index e53bba1306e4aa..4f9d4c5b747ff0 100644
--- a/files/zh-cn/web/javascript/reference/template_literals/index.md
+++ b/files/zh-cn/web/javascript/reference/template_literals/index.md
@@ -109,8 +109,8 @@ let classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
用模板字面量但不嵌套时,你可以这么做:
diff --git a/files/zh-tw/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md b/files/zh-tw/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
index d88f474899a229..69d05956a9a006 100644
--- a/files/zh-tw/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
+++ b/files/zh-tw/learn/tools_and_testing/client-side_javascript_frameworks/svelte_variables_props/index.md
@@ -387,8 +387,8 @@ Svelte 編譯器在背後會解析和分析我們的程式碼以產生相依樹
filter === "active"
? todos.filter((t) => !t.completed)
: filter === "completed"
- ? todos.filter((t) => t.completed)
- : todos;
+ ? todos.filter((t) => t.completed)
+ : todos;
```
我們使用 `filter` 變數來控制目前的過濾器:_all_、_active_、_completed_。只要將這些數值中其中一個指定給過濾器變數即可使用該過濾器並更新待辦事項清單。讓我們看看它如何做到這一點。
diff --git a/files/zh-tw/web/api/event/eventphase/index.md b/files/zh-tw/web/api/event/eventphase/index.md
index b7256228dfdb03..b31bf8106f79be 100644
--- a/files/zh-tw/web/api/event/eventphase/index.md
+++ b/files/zh-tw/web/api/event/eventphase/index.md
@@ -127,12 +127,12 @@ function OnDivClick(e) {
e.eventPhase == 0
? "none"
: e.eventPhase == 1
- ? "capturing"
- : e.eventPhase == 2
- ? "target"
- : e.eventPhase == 3
- ? "bubbling"
- : "error";
+ ? "capturing"
+ : e.eventPhase == 2
+ ? "target"
+ : e.eventPhase == 3
+ ? "bubbling"
+ : "error";
divInfo.innerHTML += e.currentTarget.id + "; eventPhase: " + level + "
";
}
diff --git a/files/zh-tw/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/zh-tw/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
index 5a9dcda28e6fd8..9369996b398406 100644
--- a/files/zh-tw/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
+++ b/files/zh-tw/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md
@@ -360,8 +360,8 @@ function loadEnd(e) {
? this.contentType === "multipart\/form-data"
? 3
: this.contentType === "text\/plain"
- ? 2
- : 1
+ ? 2
+ : 1
: 0;
this.receiver = oTarget.action;
this.status = 0;
diff --git a/files/zh-tw/web/html/element/marquee/index.md b/files/zh-tw/web/html/element/marquee/index.md
index ad6a73ccb4b00f..cb240803695327 100644
--- a/files/zh-tw/web/html/element/marquee/index.md
+++ b/files/zh-tw/web/html/element/marquee/index.md
@@ -70,7 +70,7 @@ HTML `` 元素用作插入一段文字的捲動區域。你可以透過
height="200"
behavior="alternate"
style="border:solid">
- This text will bounce
+ This text will bounce
```
diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/copywithin/index.md b/files/zh-tw/web/javascript/reference/global_objects/array/copywithin/index.md
index 87ca912e692449..7704ce31d3007d 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/array/copywithin/index.md
+++ b/files/zh-tw/web/javascript/reference/global_objects/array/copywithin/index.md
@@ -98,8 +98,8 @@ if (!Array.prototype.copyWithin) {
positiveT
? [target, stop - start, hold]
: positiveS
- ? [target, stop, hold]
- : [target, start, hold],
+ ? [target, stop, hold]
+ : [target, start, hold],
),
this.join(delimiter).split(delimiter).slice(zero, length)
);
diff --git a/files/zh-tw/web/javascript/reference/template_literals/index.md b/files/zh-tw/web/javascript/reference/template_literals/index.md
index e6f7b979ea8570..5cfa0a6d11087f 100644
--- a/files/zh-tw/web/javascript/reference/template_literals/index.md
+++ b/files/zh-tw/web/javascript/reference/template_literals/index.md
@@ -81,8 +81,8 @@ var classes = "header";
classes += isLargeScreen()
? ""
: item.isCollapsed
- ? " icon-expander"
- : " icon-collapser";
+ ? " icon-expander"
+ : " icon-collapser";
```
In ES2015 with template literals and without nesting:
diff --git a/package.json b/package.json
index 6ed955e993d1f3..5e9b25e7c0f156 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
"markdownlint-rule-search-replace": "1.2.0",
"mdast-util-from-markdown": "^2.0.0",
"ora": "^7.0.1",
- "prettier": "3.0.3",
+ "prettier": "3.1.0",
"unist-util-visit": "^5.0.0",
"yargs": "^17.7.2"
}
diff --git a/yarn.lock b/yarn.lock
index f1be003b77bcc2..f4e9b2e6e8b4c2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -967,10 +967,10 @@ pidtree@0.6.0:
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c"
integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==
-prettier@3.0.3:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
- integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==
+prettier@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.0.tgz#c6d16474a5f764ea1a4a373c593b779697744d5e"
+ integrity sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==
queue-microtask@^1.2.2:
version "1.2.3"