diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:07 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | 7a9db40025c2f387b4b75b4bd0d32a18a63c0d87 (patch) | |
tree | 50feb9ad77553c9b6737807fc5623ff9173d682e /files/zh-tw/web/javascript/reference | |
parent | c40612041809fe289aba58aefa170bbe784aba1f (diff) | |
download | translated-content-7a9db40025c2f387b4b75b4bd0d32a18a63c0d87.tar.gz translated-content-7a9db40025c2f387b4b75b4bd0d32a18a63c0d87.tar.bz2 translated-content-7a9db40025c2f387b4b75b4bd0d32a18a63c0d87.zip |
remove sup tag for zh-TW
Diffstat (limited to 'files/zh-tw/web/javascript/reference')
10 files changed, 23 insertions, 23 deletions
diff --git a/files/zh-tw/web/javascript/reference/classes/index.html b/files/zh-tw/web/javascript/reference/classes/index.html index d81add9317..06ea8d5719 100644 --- a/files/zh-tw/web/javascript/reference/classes/index.html +++ b/files/zh-tw/web/javascript/reference/classes/index.html @@ -312,7 +312,7 @@ l.speak(); </tr> <tr> <td>Basic support</td> - <td>{{CompatChrome(42.0)}}<sup>[1]</sup><br> + <td>{{CompatChrome(42.0)}}[1]<br> {{CompatChrome(49.0)}}</td> <td>{{CompatGeckoDesktop(45)}}</td> <td>13</td> @@ -343,7 +343,7 @@ l.speak(); <td>{{CompatUnknown}}</td> <td>{{CompatUnknown}}</td> <td>9</td> - <td>{{CompatChrome(42.0)}}<sup>[1]</sup><br> + <td>{{CompatChrome(42.0)}}[1]<br> {{CompatChrome(49.0)}}</td> </tr> </tbody> diff --git a/files/zh-tw/web/javascript/reference/errors/invalid_array_length/index.html b/files/zh-tw/web/javascript/reference/errors/invalid_array_length/index.html index ee2c5f08e4..89f7a02df6 100644 --- a/files/zh-tw/web/javascript/reference/errors/invalid_array_length/index.html +++ b/files/zh-tw/web/javascript/reference/errors/invalid_array_length/index.html @@ -22,11 +22,11 @@ RangeError: Invalid array buffer length (Chrome) <p>一個無效的陣列長度可能發生於以下幾種情形:</p> <ul> - <li>建立了一個長度為負或大於等於2<sup>32</sup>的 {{jsxref("Array")}} 或 {{jsxref("ArrayBuffer")}} </li> - <li>將 {{jsxref("Array.length")}} 屬性設為負值或大於等於 2<sup>32</sup></li> + <li>建立了一個長度為負或大於等於2^32的 {{jsxref("Array")}} 或 {{jsxref("ArrayBuffer")}} </li> + <li>將 {{jsxref("Array.length")}} 屬性設為負值或大於等於 2^32</li> </ul> -<p>為什麼 <code>Array</code> 和 <code>ArrayBuffer</code> 的長度有限? <code>Array</code> 和 <code>ArrayBuffer</code> 的屬性以一個32位元的非負整數表使,因此僅能儲存 0 到 2<sup>32</sup>-1 的數值。</p> +<p>為什麼 <code>Array</code> 和 <code>ArrayBuffer</code> 的長度有限? <code>Array</code> 和 <code>ArrayBuffer</code> 的屬性以一個32位元的非負整數表使,因此僅能儲存 0 到 2^32 - 1 的數值。</p> <p>If you are creating an <code>Array</code>, using the constructor, you probably want to use the literal notation instead, as the first argument is interpreted as the length of the <code>Array</code>.</p> diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/index.html index ee63054506..8417855923 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/index.html @@ -114,7 +114,7 @@ new Array(<var>arrayLength</var>)</pre> <dd>除了只傳遞一個參數給 <code>Array</code> 構造函數,且該參數為一個數字的情況(詳見下方的 arrayLength 參數),JavaScript 陣列會以傳入的元素進行初始化。</dd> <dd>請注意,這種特殊情況僅適用於以 <code>Array </code>構造函數建立的 JavaScript 陣列,而不適用於以括號語法建立的陣列常值(Array Literals)。</dd> <dt><code>arrayLength</code></dt> - <dd>如果傳遞給 <code>Array</code> 構造函數的唯一參數是 0 和 2<sup>32</sup>-1(含)之間的整數,將回傳一個新的 JavaScript 陣列,其長度被設定為這個數字。如果參數是任何其他數值,將拋出 {{jsxref("RangeError")}} 異常。</dd> + <dd>如果傳遞給 <code>Array</code> 構造函數的唯一參數是 0 和 2^32 - 1(含)之間的整數,將回傳一個新的 JavaScript 陣列,其長度被設定為這個數字。如果參數是任何其他數值,將拋出 {{jsxref("RangeError")}} 異常。</dd> </dl> <h2 id="Description">說明</h2> diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/length/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/length/index.html index 1b6497b07a..6f13a69ecd 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/length/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/length/index.html @@ -14,9 +14,9 @@ items.length; <h2 id="描述">描述</h2> -<p><code>length</code> 屬性的值必為一正整數,其值必介於 0 ~ 2<sup>32</sup> (不包含)之間.</p> +<p><code>length</code> 屬性的值必為一正整數,其值必介於 0 ~ 2^32 (不包含)之間.</p> -<pre class="brush: js">var namelistA = new Array(4294967296); //2<sup>32</sup><sup> = </sup>4294967296 +<pre class="brush: js">var namelistA = new Array(4294967296); //2^32 = 4294967296 var namelistC = new Array(-100) //負數 console.log(namelistA.length); //RangeError: Invalid array length @@ -25,7 +25,7 @@ console.log(namelistC.length); //RangeError: Invalid array length var namelistB = []; -namelistB.length = Math.pow(2,32)-1; //將長度設定介於 0 ~ 2<sup>32 </sup>-1 +namelistB.length = Math.pow(2,32)-1; //將長度設定介於 0 ~ 2^32 -1 console.log(namelistB.length); //4294967295</pre> diff --git a/files/zh-tw/web/javascript/reference/global_objects/bigint/index.html b/files/zh-tw/web/javascript/reference/global_objects/bigint/index.html index 705a85e255..35ccd60a0b 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/bigint/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/bigint/index.html @@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt --- <p>{{JSRef}}{{SeeCompatTable}}</p> -<p><code>BigInt</code> 是一個內建的物件,提供了表示大於2<sup>53</sup>的整數的功能 (2<sup>53</sup>是JavaScript原生的{{JSxRef("Number")}}能夠表示的最大值)</p> +<p><code>BigInt</code> 是一個內建的物件,提供了表示大於2^53的整數的功能 (2^53是JavaScript原生的{{JSxRef("Number")}}能夠表示的最大值)</p> <h2 id="語法">語法</h2> @@ -189,9 +189,9 @@ Boolean(12n) <dl> <dt>{{JSxRef("BigInt.asIntN()")}}</dt> - <dd>Wraps a BigInt between -2<sup>width-1</sup> and 2<sup>width-1</sup>-1</dd> + <dd>Clamps a BigInt value to a signed integer value, and returns that value.</dd> <dt>{{JSxRef("BigInt.asUintN()")}}</dt> - <dd>Wraps a BigInt between 0 and 2<sup>width</sup>-1</dd> + <dd>Clamps a BigInt value to an unsigned integer value, and returns that value.</dd> </dl> <h2 id="屬性">屬性</h2> @@ -213,7 +213,7 @@ Boolean(12n) <h3 id="轉型">轉型</h3> -<p>因為在 {{JSxRef("Global_Objects/Number", "Number")}} 和 <code>BigInt</code> 之間轉換可能造成精度遺失,建議當數值會超過2<sup>53</sup>時只使用 <code>BigInt</code> ,而不要在兩者之間進行轉換。</p> +<p>因為在 {{JSxRef("Global_Objects/Number", "Number")}} 和 <code>BigInt</code> 之間轉換可能造成精度遺失,建議當數值會超過2^53時只使用 <code>BigInt</code> ,而不要在兩者之間進行轉換。</p> <h3 id="加密">加密</h3> diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/index.html index 1c3401c908..2b09b4de23 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/index.html @@ -76,7 +76,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math <dt>{{jsxref("Global_Objects/Math/cosh", "Math.cosh(x)")}}</dt> <dd>Returns the hyperbolic cosine of a number.</dd> <dt>{{jsxref("Global_Objects/Math/exp", "Math.exp(x)")}}</dt> - <dd>回傳 E<sup>x</sup>,x 為給定數值,E 為歐拉常數 (自然對數的底數)。</dd> + <dd>回傳 E^x,x 為給定數值,E 為歐拉常數 (自然對數的底數)。</dd> <dt>{{jsxref("Global_Objects/Math/expm1", "Math.expm1(x)")}}</dt> <dd>回傳 <code>exp(x)</code> 減去1的值。</dd> <dt>{{jsxref("Global_Objects/Math/floor", "Math.floor(x)")}}</dt> @@ -100,7 +100,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math <dt>{{jsxref("Global_Objects/Math/min", "Math.min([x[, y[, …]]])")}}</dt> <dd>回傳給定數值中的最小值。</dd> <dt>{{jsxref("Global_Objects/Math/pow", "Math.pow(x, y)")}}</dt> - <dd>回傳 x 的 y 次方,也就是 <code>x<sup>y</sup></code>。</dd> + <dd>回傳 x 的 y 次方,也就是 <code>x^y</code>。</dd> <dt>{{jsxref("Global_Objects/Math/random", "Math.random()")}}</dt> <dd>回傳一個 0 到 1 之間的偽隨機值。</dd> <dt>{{jsxref("Global_Objects/Math/round", "Math.round(x)")}}</dt> diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html index 7119ba5862..4fedac7ef7 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html @@ -7,7 +7,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow --- <div>{{JSRef}}</div> -<p><strong><code>Math.pow()</code></strong> 函式回傳 <code>base</code> 的 <code>exponent</code> 次方(幂)值,也就是 <code>base<sup>exponent</sup></code>。</p> +<p><strong><code>Math.pow()</code></strong> 函式回傳 <code>base</code> 的 <code>exponent</code> 次方(幂)值,也就是 <code>base^exponent</code>。</p> <h2 id="語法">語法</h2> @@ -28,7 +28,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow <h2 id="敘述">敘述</h2> -<p>The <strong><code>Math.pow()</code></strong> function returns the <code>base</code> to the <code>exponent</code> power, that is, <code>base<sup>exponent</sup></code>, the base and the exponent are in decimal numeral system.</p> +<p>The <strong><code>Math.pow()</code></strong> function returns the <code>base</code> to the <code>exponent</code> power, that is, <code>base^exponent</code>, the base and the exponent are in decimal numeral system.</p> <p>由於 <code>pow()</code> 是 <code>Math</code> 的靜態方法,you always use it as <code>Math.pow()</code>, rather than as a method of a <code>Math</code> object you created(<code>Math</code> 並沒有建構子)。</p> diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html index 896d4ab948..6731d1c2b4 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html @@ -26,7 +26,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <h2 id="範例">範例</h2> -<p>請留意JavaScript中的數字與許多語言一樣使用 IEEE 754 floating point numbers with round-to-nearest-even behavior, the ranges claimed for the functions below (excluding the one for <code>Math.random()</code> itself) aren't exact. If extremely large bounds are chosen (2<sup>53</sup> or higher), it's possible in <em>extremely</em> rare cases to calculate the usually-excluded upper bound.</p> +<p>請留意JavaScript中的數字與許多語言一樣使用 IEEE 754 floating point numbers with round-to-nearest-even behavior, the ranges claimed for the functions below (excluding the one for <code>Math.random()</code> itself) aren't exact. If extremely large bounds are chosen (2^53 or higher), it's possible in <em>extremely</em> rare cases to calculate the usually-excluded upper bound.</p> <h3 id="Getting_a_random_number_between_0_inclusive_and_1_exclusive">Getting a random number between 0 (inclusive) and 1 (exclusive)</h3> diff --git a/files/zh-tw/web/javascript/reference/global_objects/number/index.html b/files/zh-tw/web/javascript/reference/global_objects/number/index.html index 6aad23d489..cda3475d0b 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/number/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/number/index.html @@ -39,11 +39,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Number <dt>{{jsxref("Number.EPSILON")}}</dt> <dd>介於1和大於1的最小值之可表示的差。</dd> <dt>{{jsxref("Number.MAX_SAFE_INTEGER")}}</dt> - <dd>JavaScript 中 IEEE-754 雙精度範圍間的最大整數 (<code>2<sup>53</sup> - 1</code>) 。</dd> + <dd>JavaScript 中 IEEE-754 雙精度範圍間的最大整數 (<code>2^53 - 1</code>) 。</dd> <dt>{{jsxref("Number.MAX_VALUE")}}</dt> <dd>可表示的最大正整數。</dd> <dt>{{jsxref("Number.MIN_SAFE_INTEGER")}}</dt> - <dd>JavaScript 中 IEEE-754 雙精度範圍間的最小整數 (<code>-(2<sup>53</sup> - 1)</code>) 。</dd> + <dd>JavaScript 中 IEEE-754 雙精度範圍間的最小整數 (<code>-(2^53 - 1)</code>) 。</dd> <dt>{{jsxref("Number.MIN_VALUE")}}</dt> <dd>可表示的最小值,即最靠近0的正整數?(<code><math><semantics><mrow><mn>5.00</mn><mo>×</mo><msup><mn>10</mn><mn>324</mn></msup></mrow><annotation encoding="TeX">5.00\times10^{324}</annotation></semantics></math></code>)。</dd> <dt>{{jsxref("Number.NaN")}}</dt> @@ -66,7 +66,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Number <dt>{{jsxref("Number.isInteger()")}}</dt> <dd>判斷傳入的值是不是一個整數。</dd> <dt>{{jsxref("Number.isSafeInteger()")}}</dt> - <dd>判斷傳入的值是不是在 IEEE-754 雙精度範圍間 (即介於 <code>-(2<sup>53</sup> - 1)</code> 和 <code>2<sup>53</sup> - 1</code>之前)。</dd> + <dd>判斷傳入的值是不是在 IEEE-754 雙精度範圍間 (即介於 <code>-(2^53 - 1)</code> 和 <code>2^53 - 1</code>之前)。</dd> <dt><s class="obsoleteElement">{{jsxref("Number.toInteger()")}} {{obsolete_inline}}</s></dt> <dd><s class="obsoleteElement">被用來評估傳入的值且將其轉換成整數 (或 {{jsxref("Global_Objects/Infinity", "Infinity")}}) 但已被移除。</s></dd> <dt>{{jsxref("Number.parseFloat()")}}</dt> diff --git a/files/zh-tw/web/javascript/reference/global_objects/typedarray/index.html b/files/zh-tw/web/javascript/reference/global_objects/typedarray/index.html index f37e7ac069..49be1c3db0 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/typedarray/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/typedarray/index.html @@ -149,7 +149,7 @@ Int8Array.prototype.foo = 'bar'; </tr> <tr> <td>{{jsxref("Float32Array")}}</td> - <td>1.2x10<sup>-38</sup> to 3.4x10<sup>38</sup></td> + <td>1.2x10^-38 to 3.4x10^38</td> <td>4</td> <td>32-bit IEEE floating point number ( 7 significant digits e.g. 1.1234567)</td> <td><code>unrestricted float</code></td> @@ -157,7 +157,7 @@ Int8Array.prototype.foo = 'bar'; </tr> <tr> <td>{{jsxref("Float64Array")}}</td> - <td>5.0x10<sup>-324</sup> to 1.8x10<sup>308</sup></td> + <td>5.0x10^-324 to 1.8x10^308</td> <td>8</td> <td>64-bit IEEE floating point number (16 significant digits e.g. 1.123...15)</td> <td><code>unrestricted double</code></td> |