From 7a9db40025c2f387b4b75b4bd0d32a18a63c0d87 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove sup tag for zh-TW --- files/zh-tw/web/javascript/reference/classes/index.html | 4 ++-- .../javascript/reference/errors/invalid_array_length/index.html | 6 +++--- .../web/javascript/reference/global_objects/array/index.html | 2 +- .../javascript/reference/global_objects/array/length/index.html | 6 +++--- .../web/javascript/reference/global_objects/bigint/index.html | 8 ++++---- .../zh-tw/web/javascript/reference/global_objects/math/index.html | 4 ++-- .../web/javascript/reference/global_objects/math/pow/index.html | 4 ++-- .../javascript/reference/global_objects/math/random/index.html | 2 +- .../web/javascript/reference/global_objects/number/index.html | 6 +++--- .../web/javascript/reference/global_objects/typedarray/index.html | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) (limited to 'files/zh-tw/web/javascript/reference') 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(); Basic support - {{CompatChrome(42.0)}}[1]
+ {{CompatChrome(42.0)}}[1]
{{CompatChrome(49.0)}} {{CompatGeckoDesktop(45)}} 13 @@ -343,7 +343,7 @@ l.speak(); {{CompatUnknown}} {{CompatUnknown}} 9 - {{CompatChrome(42.0)}}[1]
+ {{CompatChrome(42.0)}}[1]
{{CompatChrome(49.0)}} 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)

一個無效的陣列長度可能發生於以下幾種情形:

-

為什麼 Array  和 ArrayBuffer 的長度有限?   Array 和 ArrayBuffer 的屬性以一個32位元的非負整數表使,因此僅能儲存 0 到 232-1 的數值。

+

為什麼 Array  和 ArrayBuffer 的長度有限?   Array 和 ArrayBuffer 的屬性以一個32位元的非負整數表使,因此僅能儲存 0 到 2^32 - 1 的數值。

If you are creating an Array, using the constructor, you probably want to use the literal notation instead, as the first argument is interpreted as the length of the Array.

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(arrayLength)
除了只傳遞一個參數給 Array 構造函數,且該參數為一個數字的情況(詳見下方的 arrayLength 參數),JavaScript 陣列會以傳入的元素進行初始化。
請注意,這種特殊情況僅適用於以 Array 構造函數建立的 JavaScript 陣列,而不適用於以括號語法建立的陣列常值(Array Literals)。
arrayLength
-
如果傳遞給 Array 構造函數的唯一參數是 0 和 232-1(含)之間的整數,將回傳一個新的 JavaScript 陣列,其長度被設定為這個數字。如果參數是任何其他數值,將拋出 {{jsxref("RangeError")}} 異常。
+
如果傳遞給 Array 構造函數的唯一參數是 0 和 2^32 - 1(含)之間的整數,將回傳一個新的 JavaScript 陣列,其長度被設定為這個數字。如果參數是任何其他數值,將拋出 {{jsxref("RangeError")}} 異常。

說明

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;

描述

-

length 屬性的值必為一正整數,其值必介於 0 ~ 232 (不包含)之間.

+

length 屬性的值必為一正整數,其值必介於 0 ~ 2^32 (不包含)之間.

-
var namelistA = new Array(4294967296); //232 = 4294967296
+
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 ~ 232 -1
+namelistB.length = Math.pow(2,32)-1; //將長度設定介於 0 ~ 2^32 -1
 console.log(namelistB.length);
 
 //4294967295
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 ---

{{JSRef}}{{SeeCompatTable}}

-

BigInt 是一個內建的物件,提供了表示大於253的整數的功能 (253是JavaScript原生的{{JSxRef("Number")}}能夠表示的最大值)

+

BigInt 是一個內建的物件,提供了表示大於2^53的整數的功能 (2^53是JavaScript原生的{{JSxRef("Number")}}能夠表示的最大值)

語法

@@ -189,9 +189,9 @@ Boolean(12n)
{{JSxRef("BigInt.asIntN()")}}
-
Wraps a BigInt between -2width-1 and 2width-1-1
+
Clamps a BigInt value to a signed integer value, and returns that value.
{{JSxRef("BigInt.asUintN()")}}
-
Wraps a BigInt between 0 and 2width-1
+
Clamps a BigInt value to an unsigned integer value, and returns that value.

屬性

@@ -213,7 +213,7 @@ Boolean(12n)

轉型

-

因為在 {{JSxRef("Global_Objects/Number", "Number")}} 和 BigInt 之間轉換可能造成精度遺失,建議當數值會超過253時只使用 BigInt ,而不要在兩者之間進行轉換。

+

因為在 {{JSxRef("Global_Objects/Number", "Number")}} 和 BigInt 之間轉換可能造成精度遺失,建議當數值會超過2^53時只使用 BigInt ,而不要在兩者之間進行轉換。

加密

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
{{jsxref("Global_Objects/Math/cosh", "Math.cosh(x)")}}
Returns the hyperbolic cosine of a number.
{{jsxref("Global_Objects/Math/exp", "Math.exp(x)")}}
-
回傳 Ex,x 為給定數值,E 為歐拉常數 (自然對數的底數)。
+
回傳 E^x,x 為給定數值,E 為歐拉常數 (自然對數的底數)。
{{jsxref("Global_Objects/Math/expm1", "Math.expm1(x)")}}
回傳 exp(x) 減去1的值。
{{jsxref("Global_Objects/Math/floor", "Math.floor(x)")}}
@@ -100,7 +100,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math
{{jsxref("Global_Objects/Math/min", "Math.min([x[, y[, …]]])")}}
回傳給定數值中的最小值。
{{jsxref("Global_Objects/Math/pow", "Math.pow(x, y)")}}
-
回傳 x 的 y 次方,也就是 xy
+
回傳 x 的 y 次方,也就是 x^y
{{jsxref("Global_Objects/Math/random", "Math.random()")}}
回傳一個 0 到 1 之間的偽隨機值。
{{jsxref("Global_Objects/Math/round", "Math.round(x)")}}
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 ---
{{JSRef}}
-

Math.pow() 函式回傳 baseexponent 次方(幂)值,也就是 baseexponent

+

Math.pow() 函式回傳 baseexponent 次方(幂)值,也就是 base^exponent

語法

@@ -28,7 +28,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow

敘述

-

The Math.pow() function returns the base to the exponent power, that is, baseexponent, the base and the exponent are in decimal numeral system.

+

The Math.pow() function returns the base to the exponent power, that is, base^exponent, the base and the exponent are in decimal numeral system.

由於 pow()Math 的靜態方法,you always use it as Math.pow(), rather than as a method of a Math object you created(Math 並沒有建構子)。

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

範例

-

請留意JavaScript中的數字與許多語言一樣使用 IEEE 754 floating point numbers with round-to-nearest-even behavior, the ranges claimed for the functions below (excluding the one for Math.random() itself) aren't exact. If extremely large bounds are chosen (253 or higher), it's possible in extremely rare cases to calculate the usually-excluded upper bound.

+

請留意JavaScript中的數字與許多語言一樣使用 IEEE 754 floating point numbers with round-to-nearest-even behavior, the ranges claimed for the functions below (excluding the one for Math.random() itself) aren't exact. If extremely large bounds are chosen (2^53 or higher), it's possible in extremely rare cases to calculate the usually-excluded upper bound.

Getting a random number between 0 (inclusive) and 1 (exclusive)

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
{{jsxref("Number.EPSILON")}}
介於1和大於1的最小值之可表示的差。
{{jsxref("Number.MAX_SAFE_INTEGER")}}
-
JavaScript 中 IEEE-754 雙精度範圍間的最大整數 (253 - 1) 。
+
JavaScript 中 IEEE-754 雙精度範圍間的最大整數 (2^53 - 1) 。
{{jsxref("Number.MAX_VALUE")}}
可表示的最大正整數。
{{jsxref("Number.MIN_SAFE_INTEGER")}}
-
JavaScript 中 IEEE-754 雙精度範圍間的最小整數 (-(253 - 1)) 。
+
JavaScript 中 IEEE-754 雙精度範圍間的最小整數 (-(2^53 - 1)) 。
{{jsxref("Number.MIN_VALUE")}}
可表示的最小值,即最靠近0的正整數?(5.00×103245.00\times10^{324})。
{{jsxref("Number.NaN")}}
@@ -66,7 +66,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Number
{{jsxref("Number.isInteger()")}}
判斷傳入的值是不是一個整數。
{{jsxref("Number.isSafeInteger()")}}
-
判斷傳入的值是不是在 IEEE-754 雙精度範圍間 (即介於 -(253 - 1) 和 253 - 1之前)。
+
判斷傳入的值是不是在 IEEE-754 雙精度範圍間 (即介於 -(2^53 - 1) 和 2^53 - 1之前)。
{{jsxref("Number.toInteger()")}} {{obsolete_inline}}
被用來評估傳入的值且將其轉換成整數 (或 {{jsxref("Global_Objects/Infinity", "Infinity")}}) 但已被移除。
{{jsxref("Number.parseFloat()")}}
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'; {{jsxref("Float32Array")}} - 1.2x10-38 to 3.4x1038 + 1.2x10^-38 to 3.4x10^38 4 32-bit IEEE floating point number ( 7 significant digits e.g. 1.1234567) unrestricted float @@ -157,7 +157,7 @@ Int8Array.prototype.foo = 'bar'; {{jsxref("Float64Array")}} - 5.0x10-324 to 1.8x10308 + 5.0x10^-324 to 1.8x10^308 8 64-bit IEEE floating point number (16 significant digits e.g. 1.123...15) unrestricted double -- cgit v1.2.3-54-g00ecf