From f45e9e070c93ebbd83d488bdd775987a4d75c201 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:08 +0800 Subject: fix yari h2m dry run errors --- .../global_objects/array/concat/index.html | 2 +- .../global_objects/array/foreach/index.html | 8 +- .../reference/global_objects/array/index.html | 12 +- .../global_objects/array/indexof/index.html | 2 +- .../global_objects/array/reduce/index.html | 2 +- .../reference/global_objects/array/some/index.html | 4 +- .../global_objects/arraybuffer/index.html | 121 +-------------------- .../global_objects/asyncfunction/index.html | 2 +- .../reference/global_objects/bigint/index.html | 31 ++---- .../reference/global_objects/boolean/index.html | 82 +------------- .../reference/global_objects/dataview/index.html | 75 +------------ .../global_objects/date/getday/index.html | 4 +- .../reference/global_objects/date/index.html | 112 +++---------------- .../reference/global_objects/date/now/index.html | 75 +------------ .../reference/global_objects/date/utc/index.html | 81 +------------- .../global_objects/error/columnnumber/index.html | 50 +-------- .../reference/global_objects/error/index.html | 84 +------------- .../global_objects/function/apply/index.html | 113 ++----------------- .../global_objects/function/bind/index.html | 81 +------------- .../global_objects/function/call/index.html | 14 ++- .../reference/global_objects/function/index.html | 80 +------------- .../global_objects/function/length/index.html | 97 +---------------- .../reference/global_objects/json/parse/index.html | 75 +------------ .../global_objects/json/stringify/index.html | 51 ++------- .../reference/global_objects/math/index.html | 8 +- .../global_objects/math/random/index.html | 25 ++--- .../reference/global_objects/math/round/index.html | 73 +------------ .../reference/global_objects/null/index.html | 80 +------------- .../reference/global_objects/number/index.html | 88 +-------------- .../global_objects/number/toexponential/index.html | 84 +------------- .../global_objects/object/create/index.html | 75 +------------ .../object/defineproperties/index.html | 79 +------------- .../object/defineproperty/index.html | 4 +- .../object/getprototypeof/index.html | 70 +----------- .../object/hasownproperty/index.html | 75 +------------ .../reference/global_objects/object/index.html | 80 +------------- .../global_objects/object/keys/index.html | 75 +------------ .../object/preventextensions/index.html | 98 +---------------- .../global_objects/object/proto/index.html | 4 +- .../global_objects/promise/finally/index.html | 4 +- .../reference/global_objects/promise/index.html | 14 +-- .../global_objects/promise/then/index.html | 4 +- .../reference/global_objects/reflect/index.html | 74 +------------ .../reference/global_objects/set/has/index.html | 4 +- .../reference/global_objects/string/index.html | 10 +- .../global_objects/string/padstart/index.html | 58 +--------- .../global_objects/string/replace/index.html | 16 +-- .../reference/global_objects/typedarray/index.html | 12 +- .../reference/global_objects/undefined/index.html | 8 +- 49 files changed, 192 insertions(+), 2188 deletions(-) (limited to 'files/zh-tw/web/javascript/reference/global_objects') diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/concat/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/concat/index.html index c8fc9a7aca..45730b8fad 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/concat/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/concat/index.html @@ -44,7 +44,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/concat
  • 資料型態為字串、數值或是布林(非 {{jsxref("Global_Objects/String", "String")}}、{{jsxref("Global_Objects/Number", "Number")}} 及 {{jsxref("Global_Objects/Boolean", "Boolean")}} 物件):concat 複製字串及數值的值到新的陣列。
  • -
    +

    備註:合併(多個)陣列/(多個)值將讓原始的陣列不會被受到影響。此外,任何對新陣列(只有在元素不是物件參考的情況下)的操作都不會影響原始的陣列,反之亦然。

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/foreach/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/foreach/index.html index df1dc91684..d1f4b27a23 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/foreach/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/foreach/index.html @@ -66,8 +66,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/forEach

    forEach() does not mutate the array on which it is called (although callback, if invoked, may do so).

    -
    -

    除非是拋出異常,否則並沒有中止 forEach() 迴圈的辦法。如果你需要這樣做,forEach() 就是錯誤的用法,相反的,應該要用簡單的迴圈。如果你要測試陣列裡面的元素並回傳布林值,可以用 {{jsxref("Array.prototype.every()", "every()")}} 或 {{jsxref("Array.prototype.some()", "some()")}}。如果可以的話,新的方法 {{jsxref("Array.prototype.find()", "find()")}} 或 {{jsxref("Array.prototype.findIndex()", "findIndex()")}} 也可以用於 true 值之後提前終止。

    +
    +

    備註:除非是拋出異常,否則並沒有中止 forEach() 迴圈的辦法。如果你需要這樣做,forEach() 就是錯誤的用法,相反的,應該要用簡單的迴圈。如果你要測試陣列裡面的元素並回傳布林值,可以用 {{jsxref("Array.prototype.every()", "every()")}} 或 {{jsxref("Array.prototype.some()", "some()")}}。如果可以的話,新的方法 {{jsxref("Array.prototype.find()", "find()")}} 或 {{jsxref("Array.prototype.findIndex()", "findIndex()")}} 也可以用於 true 值之後提前終止。

    範例

    @@ -140,8 +140,8 @@ obj.sum;

    Since the thisArg parameter (this) is provided to forEach(), it is passed to callback each time it's invoked, for use as its this value.

    -
    -

    If passing the function argument using an arrow function expression the thisArg parameter can be omitted as arrow functions lexically bind the {{jsxref("Operators/this", "this")}} value.

    +
    +

    Note: If passing the function argument using an arrow function expression the thisArg parameter can be omitted as arrow functions lexically bind the {{jsxref("Operators/this", "this")}} value.

    An object copy function

    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 f6c64c360c..112a5d1e21 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 @@ -215,12 +215,12 @@ var myArray = myRe.exec('cdbBdbsbz');

    這項比對結果的屬性與元素參考如下:

    - +
    - - - + + + @@ -292,8 +292,8 @@ var myArray = myRe.exec('cdbBdbsbz');

    Array 泛型方法

    -
    -

    泛型陣列並非標準且已被棄用,將會在不久之後被去除。 

    +
    +

    警告:泛型陣列並非標準且已被棄用,將會在不久之後被去除。

    有時你想將陣列方法用於字串或其他類陣列物件(像是函數 {{jsxref("Functions/arguments", "arguments", "", 1)}})。藉此操作,你將此字串視為由字元組成的陣列(反之為將其他非陣列視為物件)。如範例,若要確認字串中的每個字元是不是字母,你可能會這樣寫:

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/indexof/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/indexof/index.html index ff6bbdba76..960e15896d 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/indexof/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/indexof/index.html @@ -14,7 +14,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/indexOf

    indexOf() 方法會回傳給定元素於陣列中第一個被找到之索引,若不存在於陣列中則回傳 -1。

    -
    +

    備註:若是調用字串的方法,請參閱 {{jsxref("String.prototype.indexOf()")}}。

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/reduce/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/reduce/index.html index 1f943d8dfa..b2caccdef9 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/reduce/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/reduce/index.html @@ -58,7 +58,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/Reduce

    當回呼函式第一次被呼叫時,accumulatorcurrentValue 的值可能為兩種不同的狀況:若在呼叫 reduce() 時有提供 initialValue,則 accumulator 將會等於 initialValue,且 currentValue 會等於陣列中的第一個元素值;若沒有提供 initialValue,則 accumulator 會等於陣列的第一個元素值,且 currentValue 將會等於陣列的第二個元素值。

    -
    +

    備註:假如 initialValue 未被提供,reduce() 將會跳過第一個陣列索引,從陣列索引 1 開始執行回呼函式。若有提供 initialValue,則會由陣列索引 0 開始執行。

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/array/some/index.html b/files/zh-tw/web/javascript/reference/global_objects/array/some/index.html index 7dd0fbdf34..4f6207b9a7 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/array/some/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/array/some/index.html @@ -16,8 +16,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/some
    {{EmbedInteractiveExample("pages/js/array-some.html")}}
    -
    -

    注意:如果輸入空陣列的話,這個方法會回傳 false

    +
    +

    備註:如果輸入空陣列的話,這個方法會回傳 false

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/index.html b/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/index.html index 6882aaf6ec..5c77343325 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/index.html @@ -56,7 +56,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/ArrayBuffer
    Returns true if arg is one of the ArrayBuffer views, such as typed array objects or a {{jsxref("DataView")}}. Returns false otherwise.
    {{jsxref("ArrayBuffer.transfer", "ArrayBuffer.transfer(oldBuffer [, newByteLength])")}} {{experimental_inline}}
    -
    Returns a new ArrayBuffer whose contents are taken from the oldBuffer's data and then is either truncated or zero-extended by newByteLength.
    +
    Returns a new ArrayBuffer whose contents are taken from the oldBuffer's data and then is either truncated or zero-extended by newByteLength.
    @@ -86,126 +86,11 @@ var view = new Int32Array(buffer);

    規範

    -
    屬性/元素說明範例屬性/元素說明範例
    input
    - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('Typed Array')}}{{Spec2('Typed Array')}}Superseded by ECMAScript 6.
    {{SpecName('ES6', '#sec-arraybuffer-constructor', 'ArrayBuffer')}}{{Spec2('ES6')}}Initial definition in an ECMA standard. Specified that new is required.
    {{SpecName('ESDraft', '#sec-arraybuffer-constructor', 'ArrayBuffer')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -

    {{CompatibilityTable}}

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support7.0{{CompatVersionUnknown}}{{CompatGeckoDesktop("2")}}1011.65.1
    ArrayBuffer() without new throws{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoDesktop("44")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    ArrayBuffer.slice() {{non-standard_inline}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    - {{CompatNo}} {{CompatGeckoDesktop("53")}}
    {{CompatNo}}{{CompatNo}}{{CompatUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support4.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2")}}1011.64.2
    ArrayBuffer() without new throws{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("44")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    ArrayBuffer.slice() {{non-standard_inline}}{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    - {{CompatNo}} {{CompatGeckoMobile("53")}}
    {{CompatNo}}{{CompatNo}}{{CompatUnknown}}
    -
    +{{Compat}}

    相容性備註

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/asyncfunction/index.html b/files/zh-tw/web/javascript/reference/global_objects/asyncfunction/index.html index c25f3ee3a1..8890a3bc65 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/asyncfunction/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/asyncfunction/index.html @@ -31,7 +31,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/AsyncFunction

    All arguments passed to the function are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed.

    -
    +

    Note: {{jsxref("Statements/async_function", "async functions")}} created with the AsyncFunction constructor do not create closures to their creation contexts; they are always created in the global scope. When running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the AsyncFunction constructor was called. This is different from using {{jsxref("Global_Objects/eval", "eval")}} with code for an async function expression.

    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 35ccd60a0b..2e62e69184 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 @@ -19,8 +19,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt
    欲創建的數值,可以為整數或字串。
    -
    -

    Note: BigInt() 不和 {{JSxRef("Operators/new", "new")}} 一起使用。

    +
    +

    Note: BigInt() 不和 {{JSxRef("Operators/new", "new")}} 一起使用。

    @@ -47,8 +47,8 @@ const hugeBin = BigInt("0b11111111111111111111111111111111111111111111111111111"

    BigInt 跟 {{JSxRef("Number")}} 很像,但在某些部分有些許不同 — 它不可以被用在內建的 {{JSxRef("Math")}} 物件方法中、而且不可以跟 Number 的實體混用運算子。

    -
    -

    {{JSxRef("Number")}} 和 BigInt 不能混和計算 — 他們必須被轉換到同一個型態。

    +
    +

    警告: {{JSxRef("Number")}} 和 BigInt 不能混和計算 — 他們必須被轉換到同一個型態。

    然而,在相互轉換時要注意, BigInt 在被轉換成 Number 時可能會遺失部分精度的資訊。

    @@ -97,8 +97,8 @@ bigN * -1n

    / 運算子也同樣的能夠運行。然而,因為型態是 BigInt 而不是 BigDecimal ,除法運算會無條件捨去小數。也就是說,回傳值不會包含小數部分。

    -
    -

    回傳值帶小數的運算在使用BigInt  時小數部分會被捨去。

    +
    +

    警告:回傳值帶小數的運算在使用BigInt 時小數部分會被捨去。

    const expected = 4n / 2n;
    @@ -251,26 +251,11 @@ nthPrime(20n)
     
     

    規範

    - - - - - - - - - - - -
    規範狀態
    BigIntStage 3
    +{{Specifications}}

    瀏覽器相容性

    -
    - - -

    {{Compat("javascript.builtins.BigInt")}}

    -
    +{{Compat}}

    另見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/boolean/index.html b/files/zh-tw/web/javascript/reference/global_objects/boolean/index.html index 0e817070dc..d35d07470b 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/boolean/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/boolean/index.html @@ -104,91 +104,13 @@ var bObjProto = new Boolean({});

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態註記
    {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
    {{SpecName('ES5.1', '#sec-15.6', 'Boolean')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES6', '#sec-boolean-objects', 'Boolean')}}{{Spec2('ES6')}} 
    {{SpecName('ESDraft', '#sec-boolean-objects', 'Boolean')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    {{CompatibilityTable}}
    -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatIE("6.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    參見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/dataview/index.html b/files/zh-tw/web/javascript/reference/global_objects/dataview/index.html index 8d4406dd9e..f7ef3094ff 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/dataview/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/dataview/index.html @@ -80,82 +80,11 @@ dv.getInt16(1); //42

    規範

    - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('Typed Array')}}{{Spec2('Typed Array')}}Superseded by ECMAScript 6
    {{SpecName('ES6', '#sec-dataview-constructor', 'DataView')}}{{Spec2('ES6')}}Initial definition in an ECMA standard
    {{SpecName('ESDraft', '#sec-dataview-constructor', 'DataView')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -

    {{CompatibilityTable}}

    - -
    - - - - - - - - - - - - - - - - - - - -
    FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support9.0{{CompatGeckoDesktop("15.0")}}1012.15.1
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support4.0{{CompatVersionUnknown}}{{CompatGeckoMobile("15")}}{{CompatUnknown}}12.04.2
    -
    +{{Compat}}

    Firefox-specific notes

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/date/getday/index.html b/files/zh-tw/web/javascript/reference/global_objects/date/getday/index.html index dd5ebc36d4..80ab81fa2d 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/date/getday/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/date/getday/index.html @@ -29,8 +29,8 @@ var weekday = Xmas95.getDay(); console.log(weekday); // 1
    -
    -

    Note: 如果需要,可以使用{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}加上options參數來獲取星期幾全名。使使用此方法能輕鬆做出各種國際語言:

    +
    +

    備註:如果需要,可以使用{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}加上options參數來獲取星期幾全名。使使用此方法能輕鬆做出各種國際語言:

    var options = { weekday: 'long'};
     console.log(new Intl.DateTimeFormat('en-US', options).format(Xmas95));
    diff --git a/files/zh-tw/web/javascript/reference/global_objects/date/index.html b/files/zh-tw/web/javascript/reference/global_objects/date/index.html
    index 1b1873dd22..9e7cab6fe9 100644
    --- a/files/zh-tw/web/javascript/reference/global_objects/date/index.html
    +++ b/files/zh-tw/web/javascript/reference/global_objects/date/index.html
    @@ -18,18 +18,18 @@ new Date(dateString);
     new Date(year, month[, day[, hour[, minutes[, seconds[, milliseconds]]]]]);
     
    -
    -

    附註: JavaScript Date 物件只能由以 Date 作為建構子來產生,如果把 Date 作為一般的函數來呼叫(省略掉 {{jsxref("Operators/new", "new")}} 運算子)將會得到一個字串而非 Date 物件;與其它 JavaScript 物件不同,它並沒有物件實體語法(例如:以中刮號 [ ] 表示陣列的宣告方式)。

    +
    +

    備註:JavaScript Date 物件只能由以 Date 作為建構子來產生,如果把 Date 作為一般的函數來呼叫(省略掉 {{jsxref("Operators/new", "new")}} 運算子)將會得到一個字串而非 Date 物件;與其它 JavaScript 物件不同,它並沒有物件實體語法(例如:以中刮號 [ ] 表示陣列的宣告方式)。

    參數

    -
    -

    附註:當傳入超過一個參數到 Date 建構子,若參數值超過它的合理範圍(例如:傳數值 13 到月份,或傳數值 70 給分鐘),相鄰的參數值將會被調整。例如: new Date(2013, 13, 1) 將等同於 new Date(2014, 1, 1) 都會建立代表 2014-02-01 的物件(注意月份值由 0 開始)。同樣的, new Date(2013, 2, 1, 0, 70)new Date(2013, 2, 1, 1, 10) 一樣會建立代表 2013-03-01T01:10:00 的 Date 物件。

    +
    +

    備註:當傳入超過一個參數到 Date 建構子,若參數值超過它的合理範圍(例如:傳數值 13 到月份,或傳數值 70 給分鐘),相鄰的參數值將會被調整。例如: new Date(2013, 13, 1) 將等同於 new Date(2014, 1, 1) 都會建立代表 2014-02-01 的物件(注意月份值由 0 開始)。同樣的, new Date(2013, 2, 1, 0, 70)new Date(2013, 2, 1, 1, 10) 一樣會建立代表 2013-03-01T01:10:00 的 Date 物件。

    -
    -

    附註:當傳入超過一個參數到 Date 建構子,所指定的參數值會視為本地時間。如果希望指定的值為世界標準時間(UTC),則應使用 new Date({{jsxref("Date.UTC()", "Date.UTC(...)")}}) 語法,傳入一樣格式的參數。

    +
    +

    備註:當傳入超過一個參數到 Date 建構子,所指定的參數值會視為本地時間。如果希望指定的值為世界標準時間(UTC),則應使用 new Date({{jsxref("Date.UTC()", "Date.UTC(...)")}}) 語法,傳入一樣格式的參數。

    @@ -37,8 +37,8 @@ new Date(year, month[, day[, hour[,
    自世界標準時間(UTC) 1970 年 1 月 1 日 00:00:00 開始的毫秒整數(Integer)值(Unix 紀元;但要注意到大多 Unix 時間戳記是以秒而非毫秒為單位)。
    dateString
    表示時間日期的字串。這個字串應該要能被 {{jsxref("Date.parse()")}} 方法解析(符合 IETF-compliant RFC 2822 timestampsversion of ISO8601 格式要求). -
    -

    附註: 由於各家瀏覽器有所不同且具有差異性,因此非常不鼓勵使用 Date 建構子(或 Date.parse 方法,它們是同等的)來解析時間日期字串。

    +
    +

    備註:由於各家瀏覽器有所不同且具有差異性,因此非常不鼓勵使用 Date 建構子(或 Date.parse 方法,它們是同等的)來解析時間日期字串。

    year
    @@ -84,8 +84,8 @@ new Date(year, month[, day[, hour[,
    回傳對應於當下時間的數值 - 1970/01/01 00:00:00 (UTC) 到當下的毫秒數。
    {{jsxref("Date.parse()")}}
    解析字串所表示的時間,回傳由 1970/01/01 00:00:00 (UTC) 到該時間的毫秒數值。 -
    -

    附註:由於瀏覽器之間的不同與差異,強烈不建議使用 Date.parse

    +
    +

    備註:由於瀏覽器之間的不同與差異,強烈不建議使用 Date.parse

    {{jsxref("Date.UTC()")}}
    @@ -106,8 +106,8 @@ new Date(year, month[, day[, hour[,

    接下來的幾個範例,展示幾種建立 Date 物件的方式:

    -
    -

    附註: 由於瀏覽器之間的不同與差異,強烈不建議使用解析字串的方式建立 Date 物件。

    +
    +

    備註:由於瀏覽器之間的不同與差異,強烈不建議使用解析字串的方式建立 Date 物件。

    var today = new Date();
    @@ -166,97 +166,17 @@ function printElapsedTime(fTest) {
     yourFunctionReturn = printElapsedTime(yourFunction);
     
    -
    -

    附註:在瀏覽器支援 {{domxref("window.performance", "Web Performance API", "", 1)}} 高精度特性下, {{domxref("Performance.now()")}} 可以提供比 {{jsxref("Date.now()")}} 更可靠、精確的執行時間測試結果。

    +
    +

    備註:在瀏覽器支援 {{domxref("window.performance", "Web Performance API", "", 1)}} 高精度特性下, {{domxref("Performance.now()")}} 可以提供比 {{jsxref("Date.now()")}} 更可靠、精確的執行時間測試結果。

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態
    {{SpecName('ESDraft', '#sec-date-objects', 'Date')}}{{Spec2('ESDraft')}} 
    {{SpecName('ES6', '#sec-date-objects', 'Date')}}{{Spec2('ES6')}} 
    {{SpecName('ES5.1', '#sec-15.9', 'Date')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES1')}}{{Spec2('ES1')}}初步定義。實作在 JavaScript 1.1。
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    平台ChromeFirefox (Gecko)Internet ExplorerOperaSafari
    -

    基本支援

    -
    {{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    平台AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    -

    基本支援

    -
    {{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    [1] 一些瀏覽器在解析日期時間會發生問題: 3/14/2012 blog from danvk Comparing FF/IE/Chrome on Parsing Date Strings

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/date/now/index.html b/files/zh-tw/web/javascript/reference/global_objects/date/now/index.html index ca67a2e534..a6ea13ec86 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/date/now/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/date/now/index.html @@ -38,82 +38,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/now

    規範

    - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態
    {{SpecName('ES5.1', '#sec-15.9.4.4', 'Date.now')}}{{Spec2('ES5.1')}}初始定義,實作在 JavaScript 1.5 。
    {{SpecName('ES6', '#sec-date.now', 'Date.now')}}{{Spec2('ES6')}} 
    {{SpecName('ESDraft', '#sec-date.now', 'Date.now')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    平台ChromeFirefox (Gecko)Internet ExplorerOperaSafari
    基本支援{{CompatChrome("5")}}{{CompatGeckoDesktop("1.9")}}{{CompatIE("9")}}{{CompatOpera("10.50")}}{{CompatSafari("4")}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    平台AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    基本支援{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    相關資源

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/date/utc/index.html b/files/zh-tw/web/javascript/reference/global_objects/date/utc/index.html index 50ab7590ea..9d9a95d526 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/date/utc/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/date/utc/index.html @@ -67,88 +67,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/UTC

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態
    {{SpecName('ESDraft', '#sec-date.utc', 'Date.UTC')}}{{Spec2('ESDraft')}} 
    {{SpecName('ES6', '#sec-date.utc', 'Date.UTC')}}{{Spec2('ES6')}} 
    {{SpecName('ES5.1', '#sec-15.9.4.3', 'Date.UTC')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES1')}}{{Spec2('ES1')}}初始定義。
    - 實作在 JavaScript 1.0.
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    平台ChromeFirefox (Gecko)Internet ExplorerOperaSafari
    基本支援{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    平台AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    基本支援{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    -
    +{{Compat}}

    相關資源

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/error/columnnumber/index.html b/files/zh-tw/web/javascript/reference/global_objects/error/columnnumber/index.html index ca1dc77233..55e052ed77 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/error/columnnumber/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/error/columnnumber/index.html @@ -22,55 +22,7 @@ console.log(e.columnNumber) // 0

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
    -
    +{{Compat}}

    See also

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/error/index.html b/files/zh-tw/web/javascript/reference/global_objects/error/index.html index 51e58faf45..67f675c25a 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/error/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/error/index.html @@ -111,8 +111,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Error

    You might want to define your own error types deriving from Error to be able to throw new MyError() and use instanceof MyError to check the kind of error in the exception handler. The common way to do this is demonstrated below.

    -
    -

    Note that the thrown MyError will report incorrect lineNumber and fileName at least in Firefox.

    +
    +

    Warning: Note that the thrown MyError will report incorrect lineNumber and fileName at least in Firefox.

    See also the "What's a good way to extend Error in JavaScript?" discussion on Stackoverflow.

    @@ -142,87 +142,11 @@ try {

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.1.
    {{SpecName('ES5.1', '#sec-15.11', 'Error')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES6', '#sec-error-objects', 'Error')}}{{Spec2('ES6')}} 
    {{SpecName('ESDraft', '#sec-error-objects', 'Error')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    參見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/apply/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/apply/index.html index 9d5aba8312..03e58de21b 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/function/apply/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/function/apply/index.html @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Function/apply

    apply() 方法會呼叫一個以 this 的代表值和一個陣列形式的值組(或是一個 array-like object )為參數的函式。

    -
    -

    注意:這個函式的語法和{{jsxref("Function.call", "call()")}} 幾乎一樣,最大的不同是 call() 接受一連串的參數,而 apply() 接受一組陣列形式的參數

    +
    +

    備註:這個函式的語法和{{jsxref("Function.call", "call()")}} 幾乎一樣,最大的不同是 call() 接受一連串的參數,而 apply() 接受一組陣列形式的參數

    語法

    @@ -38,8 +38,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Function/apply

    從 ECMAScript 5th 版本後,也可以使用陣列形式的物件,在實踐上這代表他會擁有 length 以及整數範圍  (0...length-1) 的屬性。舉例來說,你可以使用 {{domxref("NodeList")}}  或是一個像這樣的自定義屬性: { 'length': 2, '0': 'eat', '1': 'bananas' }。

    -
    -

    一般瀏覽器,包括 Chrome 14 及 Internet Explorer 9,仍不支援陣列形式的物件,所以會對此丟出一個錯誤。

    +
    +

    備註:一般瀏覽器,包括 Chrome 14 及 Internet Explorer 9,仍不支援陣列形式的物件,所以會對此丟出一個錯誤。

    範例

    @@ -55,8 +55,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Function/apply }; -
    -

    注意:如上範例的 Object.create() 方法是屬於比較新的寫法。如需使用閉包的替代方法,請參考以下的範例:

    +
    +

    備註:如上範例的 Object.create() 方法是屬於比較新的寫法。如需使用閉包的替代方法,請參考以下的範例:

    Function.prototype.construct = function(aArgs) {
       var fConstructor = this, fNewConstr = function() {
    @@ -83,8 +83,8 @@ console.log(myInstance instanceof MyConstructor); // logs 'true'
     console.log(myInstance.constructor);              // logs 'MyConstructor'
     
    -
    -

    注意:This non-native Function.construct method will not work with some native constructors (like {{jsxref("Date")}}, for example). In these cases you have to use the {{jsxref("Function.prototype.bind")}} method (for example, imagine having an array like the following, to be used with {{jsxref("Global_Objects/Date", "Date")}} constructor: [2012, 11, 4]; in this case you have to write something like: new (Function.prototype.bind.apply(Date, [null].concat([2012, 11, 4])))() — anyhow this is not the best way to do things and probably should not be used in any production environment).

    +
    +

    備註:This non-native Function.construct method will not work with some native constructors (like {{jsxref("Date")}}, for example). In these cases you have to use the {{jsxref("Function.prototype.bind")}} method (for example, imagine having an array like the following, to be used with {{jsxref("Global_Objects/Date", "Date")}} constructor: [2012, 11, 4]; in this case you have to write something like: new (Function.prototype.bind.apply(Date, [null].concat([2012, 11, 4])))() — anyhow this is not the best way to do things and probably should not be used in any production environment).

    使用 apply 於內建的函數

    @@ -150,104 +150,11 @@ someobject.foo = function() {

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES3')}}{{Spec2('ES3')}}Initial definition. Implemented in JavaScript 1.3.
    {{SpecName('ES5.1', '#sec-15.3.4.3', 'Function.prototype.apply')}}{{Spec2('ES5.1')}}
    {{SpecName('ES6', '#sec-function.prototype.apply', 'Function.prototype.apply')}}{{Spec2('ES6')}}
    {{SpecName('ESDraft', '#sec-function.prototype.apply', 'Function.prototype.apply')}}{{Spec2('ESDraft')}}
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    ES 5.1 generic array-like object as {{jsxref("Functions/arguments", "arguments")}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    ES 5.1 generic array-like object as {{jsxref("Functions/arguments", "arguments")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    -
    +{{Compat}}

    參見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/bind/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/bind/index.html index 006db2aa4c..12ce075840 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/function/bind/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/function/bind/index.html @@ -108,7 +108,7 @@ flower.bloom();

    Bound functions used as constructors

    -
    +

    Warning: This section demonstrates JavaScript capabilities and documents some edge cases of the bind() method. The methods shown below are not the best way to do things and probably should not be used in any production environment.

    @@ -231,86 +231,11 @@ slice(arguments);

    規範

    - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES5.1', '#sec-15.3.4.5', 'Function.prototype.bind')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.8.5.
    {{SpecName('ES2015', '#sec-function.prototype.bind', 'Function.prototype.bind')}}{{Spec2('ES2015')}} 
    {{SpecName('ESDraft', '#sec-function.prototype.bind', 'Function.prototype.bind')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatChrome("7")}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("2")}}{{CompatIE("9")}}{{CompatOpera("11.60")}}{{CompatSafari("5.1")}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatAndroid("4.0")}}{{CompatChrome("1")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2")}}{{CompatUnknown}}{{CompatOperaMobile("11.5")}}{{CompatSafari("6.0")}}
    -
    +{{Compat}}

    相關連結

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/call/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/call/index.html index 1d1d2017ee..64a42d065a 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/function/call/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/function/call/index.html @@ -9,12 +9,14 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Function/call

    使用給定的this參數以及分別給定的參數來呼叫某個函數

    -
    附註: 此函數的所有語法大致上與apply()相同,他們基本上不同處只有 call() 接受一連串的參數,而 apply() 單一的array作為參數
    +
    +

    備註: 此函數的所有語法大致上與apply()相同,他們基本上不同處只有 call() 接受一連串的參數,而 apply() 單一的array作為參數

    +
    - + @@ -98,6 +100,14 @@ for (var i = 0; i < animals.length; i++) { } +

    規範

    + +{{Specifications}} + +

    瀏覽器相容性

    + +{{Compat}} +

    參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/index.html index c7321e3bd8..72c75d7615 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/function/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/function/index.html @@ -96,87 +96,11 @@ console.log(f2()); // 20

      規範

      -
    Function 物件的方法Function 物件的方法
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
    {{SpecName('ES5.1', '#sec-15.3', 'Function')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES6', '#sec-function-objects', 'Function')}}{{Spec2('ES6')}} 
    {{SpecName('ESDraft', '#sec-function-objects', 'Function')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    參見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/length/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/length/index.html index f1498d4e5d..6e83cb3b2c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/function/length/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/function/length/index.html @@ -38,104 +38,11 @@ console.log((function(a, b = 1, c) {}).length); /* 1 */

    規範

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態註釋
    {{SpecName('ES1')}}{{Spec2('ES1')}}最初的定義,在 JavaScript 1.1 中實作。
    {{SpecName('ES5.1', '#sec-15.3.5.1', 'Function.length')}}{{Spec2('ES5.1')}} 
    {{SpecName('ES6', '#sec-function-instances-length', 'Function.length')}}{{Spec2('ES6')}}此 property 的 configurable attribute 現在為 true.
    {{SpecName('ESDraft', '#sec-function-instances-length', 'Function.length')}}{{Spec2('ESDraft')}} 
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    特點ChromeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    Configurable: true{{CompatUnknown}}{{CompatGeckoDesktop(37)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    Configurable: true{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile(37)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
    -
    +{{Compat}}

    可參閱

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/json/parse/index.html b/files/zh-tw/web/javascript/reference/global_objects/json/parse/index.html index 663d5fb6ce..c5623e7a89 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/json/parse/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/json/parse/index.html @@ -77,82 +77,11 @@ JSON.parse('{"foo" : 1, }');

    規範

    - - - - - - - - - - - - - - - - - - - - - - - -
    規範狀態註解
    {{SpecName('ES5.1', '#sec-15.12.2', 'JSON.parse')}}{{Spec2('ES5.1')}}初始定義。從 JavaScript 1.7 導入。
    {{SpecName('ES6', '#sec-json.parse', 'JSON.parse')}}{{Spec2('ES6')}}
    {{SpecName('ESDraft', '#sec-json.parse', 'JSON.parse')}}{{Spec2('ESDraft')}}
    +{{Specifications}}

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - -
    特徵ChromeFirefox (Gecko)Internet ExplorerOperaSafari
    基本功能{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9.1")}}{{CompatIE("8.0")}}{{CompatOpera("10.5")}}{{CompatSafari("4.0")}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    特徵AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    基本功能{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
    -
    +{{Compat}}

    Gecko相關

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html b/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html index 98f01ef784..bc254ca8b5 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html @@ -76,7 +76,7 @@ JSON.stringify( Object.create(null, { x: { value: 'x', enumerable: false }, y: { -

    The replacer parameter

    +

    The replacer parameter

    The replacer parameter can be either a function or an array. As a function, it takes two parameters, the key and the value being stringified. The object in which the key was found is provided as the replacer's this parameter. Initially it gets called with an empty key representing the object being stringified, and it then gets called for each property on the object or array being stringified. It should return the value that should be added to the JSON string, as follows:

    @@ -88,7 +88,7 @@ JSON.stringify( Object.create(null, { x: { value: 'x', enumerable: false }, y: {
  • If you return undefined, the property is not included (i.e., filtered out) in the output JSON string.
  • -
    Note: You cannot use the replacer function to remove values from an array. If you return undefined or a function then null is used instead.
    +

    Note: You cannot use the replacer function to remove values from an array. If you return undefined or a function then null is used instead.

    Example with a function

    @@ -113,7 +113,7 @@ JSON.stringify(foo, replacer); // '{"week":45,"month":7}', only keep "week" and "month" properties -

    The space argument

    +

    The space argument

    The space argument may be used to control spacing in the final string. If it is a number, successive levels in the stringification will each be indented by this many space characters (up to 10). If it is a string, successive levels will be indented by this string (or the first ten characters of it).

    @@ -209,8 +209,8 @@ alert(jsFriendlyJSONStringify(s)); // {"a":"\u2028","b":"\u2029"}

    In a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of JSON.stringify():

    -
    -

    Functions are not a valid JSON data type so they will not work. However, they can be displayed if first converted to a string (e.g. in the replacer), via the function's toString method. Also, some objects like {{jsxref("Date")}} will be a string after {{jsxref("JSON.parse()")}}.

    +
    +

    Warning: Functions are not a valid JSON data type so they will not work. However, they can be displayed if first converted to a string (e.g. in the replacer), via the function's toString method. Also, some objects like {{jsxref("Date")}} will be a string after {{jsxref("JSON.parse()")}}.

    // Creating an example of JSON
    @@ -238,40 +238,13 @@ var restoredSession = JSON.parse(localStorage.getItem('session'));
     console.log(restoredSession);
     
    -

    Specifications

    - - - - - - - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES5.1', '#sec-15.12.3', 'JSON.stringify')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.7.
    {{SpecName('ES6', '#sec-json.stringify', 'JSON.stringify')}}{{Spec2('ES6')}}
    {{SpecName('ESDraft', '#sec-json.stringify', 'JSON.stringify')}}{{Spec2('ESDraft')}}
    - -

    Browser compatibility

    - -
    - - -

    {{Compat("javascript.builtins.JSON.stringify")}}

    -
    +

    規範

    + +{{Specifications}} + +

    瀏覽器相容性

    + +{{Compat}}

    See also

    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 2b09b4de23..b200a53959 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 @@ -40,12 +40,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math

    方法

    -
    -

    注意三角函數 (sin(), cos(), tan(), asin(), acos(), atan(), atan2()) 的參數或回傳值的角度皆以弧度為單位。把角度乘上 (Math.PI / 180) 會得到弧度單位,將弧度除以該數則會轉換回一般所用的角度單位。

    +
    +

    備註:三角函數 (sin(), cos(), tan(), asin(), acos(), atan(), atan2()) 的參數或回傳值的角度皆以弧度為單位。把角度乘上 (Math.PI / 180) 會得到弧度單位,將弧度除以該數則會轉換回一般所用的角度單位。

    -
    -

    注意許多數學方法的精度是取決於實作方式的。這意味著不同的瀏覽器可能會得到不同的結果,甚至同一個 JS引擎在不同的作業系統或架構上所得到的結果都有可能相異。

    +
    +

    備註:許多數學方法的精度是取決於實作方式的。這意味著不同的瀏覽器可能會得到不同的結果,甚至同一個 JS引擎在不同的作業系統或架構上所得到的結果都有可能相異。

    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 6731d1c2b4..8087d30bfd 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 @@ -10,8 +10,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random

    函數 Math.random() 會回傳一個偽隨機小數 (pseudo-random) 介於0到1之間(包含 0,不包含1) ,大致符合數學與統計上的均勻分佈 (uniform distribution) ,您可以選定想要的數字區間,它會透過演算法被產生並且不允許使用者自行跳選或重設成特定數字。{{EmbedInteractiveExample("pages/js/math-random.html")}}

    -
    -

    Math.random() 所產生的偽隨機小數不符合加密學安全性要求。請勿使用於任何加密、資安相關領域。

    +
    +

    備註:Math.random() 所產生的偽隨機小數不符合加密學安全性要求。請勿使用於任何加密、資安相關領域。

    如有加密需求建議參考Web Crypto APIwindow.crypto.getRandomValues()

    @@ -55,8 +55,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random } -
    -

    It might be tempting to use Math.round() to accomplish that, but doing so would cause your random numbers to follow a non-uniform distribution, which may not be acceptable for your needs.

    +
    +

    Note: might be tempting to use Math.round() to accomplish that, but doing so would cause your random numbers to follow a non-uniform distribution, which may not be acceptable for your needs.

    Getting a random integer between two values, inclusive

    @@ -69,24 +69,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive } -

    Specifications

    +

    規範

    - - - - - - - - - -
    Specification
    {{SpecName('ESDraft', '#sec-math.random', 'Math.random')}}
    +{{Specifications}}

    瀏覽器相容性

    -

    {{Compat("javascript.builtins.Math.random")}}

    +{{Compat}} -

    其他參考資料

    +

    其他參考資料

    • window.crypto.getRandomValues()
    • diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/round/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/round/index.html index efde660a66..8b37f8b851 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/round/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/round/index.html @@ -126,80 +126,11 @@ Math.ceil10(-59, 1); // -50

      規範

      - - - - - - - - - - - - - - - - - - - - - - - -
      規範狀態
      {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
      {{SpecName('ES5.1', '#sec-15.8.2.15', 'Math.round')}}{{Spec2('ES5.1')}} 
      {{SpecName('ES6', '#sec-math.round', 'Math.round')}}{{Spec2('ES6')}} 
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/null/index.html b/files/zh-tw/web/javascript/reference/global_objects/null/index.html index a32debbd16..2e270445a6 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/null/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/null/index.html @@ -34,87 +34,11 @@ null == undefined // true

      規範

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition.
      {{SpecName('ES5.1', '#sec-4.3.11', 'null value')}}{{Spec2('ES5.1')}} 
      {{SpecName('ES6', '#sec-null-value', 'null value')}}{{Spec2('ES6')}} 
      {{SpecName('ESDraft', '#sec-null-value', 'null value')}}{{Spec2('ESDraft')}} 
      +{{Specifications}}

      瀏覽器相容性

      -

      {{CompatibilityTable}}

      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參見

      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 cda3475d0b..45500f4178 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 @@ -67,8 +67,6 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Number
      判斷傳入的值是不是一個整數。
      {{jsxref("Number.isSafeInteger()")}}
      判斷傳入的值是不是在 IEEE-754 雙精度範圍間 (即介於 -(2^53 - 1) 和 2^53 - 1之前)。
      -
      {{jsxref("Number.toInteger()")}} {{obsolete_inline}}
      -
      被用來評估傳入的值且將其轉換成整數 (或 {{jsxref("Global_Objects/Infinity", "Infinity")}}) 但已被移除。
      {{jsxref("Number.parseFloat()")}}
      這個方法和全域物件的 {{jsxref("parseFloat", "parseFloat()")}} 相同。
      {{jsxref("Number.parseInt()")}}
      @@ -129,87 +127,11 @@ Number("100a") // NaN

      規範

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      規範狀態註記
      {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.1.
      {{SpecName('ES5.1', '#sec-15.7', 'Number')}}{{Spec2('ES5.1')}} 
      {{SpecName('ES6', '#sec-number-objects', 'Number')}}{{Spec2('ES6')}}New methods and properties added: {{jsxref("Number.EPSILON", "EPSILON")}}, {{jsxref("Number.isFinite", "isFinite")}}, {{jsxref("Number.isInteger", "isInteger")}}, {{jsxref("Number.isNaN", "isNaN")}}, {{jsxref("Number.parseFloat", "parseFloat")}}, {{jsxref("Number.parseInt", "parseInt")}}
      {{SpecName('ESDraft', '#sec-number-objects', 'Number')}}{{Spec2('ESDraft')}} 
      - -

      瀏覽器相容

      - -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Specifications}} + +

      瀏覽器相容性

      + +{{Compat}}

      參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/number/toexponential/index.html b/files/zh-tw/web/javascript/reference/global_objects/number/toexponential/index.html index 9c40c2fe5b..884ed6d97c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/number/toexponential/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/number/toexponential/index.html @@ -71,89 +71,13 @@ console.log(77.1234.toExponential()); // logs 7.71234e+1 console.log(77 .toExponential()); // logs 7.7e+1 -

      Specifications

      +

      規範

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES3')}}{{Spec2('ES3')}}Initial definition. Implemented in JavaScript 1.5.
      {{SpecName('ES5.1', '#sec-15.7.4.6', 'Number.prototype.toExponential')}}{{Spec2('ES5.1')}} 
      {{SpecName('ES6', '#sec-number.prototype.toexponential', 'Number.prototype.toExponential')}}{{Spec2('ES6')}} 
      {{SpecName('ESDraft', '#sec-number.prototype.toexponential', 'Number.prototype.toExponential')}}{{Spec2('ESDraft')}} 
      - -

      瀏覽器支援度

      +{{Specifications}} -
      {{CompatibilityTable}}
      +

      瀏覽器相容性

      -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      延伸閱讀

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/create/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/create/index.html index f8e71aeae1..b58f9173cd 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/create/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/create/index.html @@ -171,82 +171,11 @@ o2 = Object.create({}, {

      規範

      - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES5.1', '#sec-15.2.3.5', 'Object.create')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.8.5.
      {{SpecName('ES6', '#sec-object.create', 'Object.create')}}{{Spec2('ES6')}} 
      {{SpecName('ESDraft', '#sec-object.create', 'Object.create')}}{{Spec2('ESDraft')}} 
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatChrome("5")}}{{CompatGeckoDesktop("2")}}{{CompatIE("9")}}{{CompatOpera("11.60")}}{{CompatSafari("5")}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("2")}}{{CompatVersionUnknown}}{{CompatOperaMobile("11.5")}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參閱

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/defineproperties/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/defineproperties/index.html index 7739ab4bdd..1ea2f29f71 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/defineproperties/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/defineproperties/index.html @@ -69,7 +69,7 @@ Object.defineProperties(obj, {

      Assuming a pristine execution environment with all names and properties referring to their initial values, Object.defineProperties is almost completely equivalent (note the comment in isCallable) to the following reimplementation in JavaScript:

      -
      function defineProperties(obj, properties) {
      +
      function defineProperties(obj, properties) {
         function convertToDescriptor(desc) {
           function hasProperty(obj, prop) {
             return Object.prototype.hasOwnProperty.call(obj, prop);
      @@ -131,82 +131,13 @@ Object.defineProperties(obj, {
       }
       
      -

      規格

      - - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatus註記
      {{SpecName('ES5.1', '#sec-15.2.3.7', 'Object.defineProperties')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.8.5
      {{SpecName('ES6', '#sec-object.defineproperties', 'Object.defineProperties')}}{{Spec2('ES6')}} 
      {{SpecName('ESDraft', '#sec-object.defineproperties', 'Object.defineProperties')}}{{Spec2('ESDraft')}} 
      +

      規範

      + +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureFirefox (Gecko)ChromeInternet ExplorerOperaSafari
      Basic support{{CompatGeckoDesktop("2")}}{{CompatChrome("5")}}{{CompatIE("9")}}{{CompatOpera("11.60")}}{{CompatSafari("5")}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
      Basic support{{CompatGeckoMobile("2")}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatOperaMobile("11.5")}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參閱

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/defineproperty/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/defineproperty/index.html index f9f6c44d39..7413ff384c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/defineproperty/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/defineproperty/index.html @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/defineProperty

      靜態方法 Object.defineProperty() 會直接對一個物件定義、或是修改現有的屬性。執行後會回傳定義完的物件。

      -
      -

      注:這個方法會直接針對 {{jsxref("Object")}} 呼叫建構子(constructor),而不是 Object 型別的實例。

      +
      +

      備註:這個方法會直接針對 {{jsxref("Object")}} 呼叫建構子(constructor),而不是 Object 型別的實例。

      {{EmbedInteractiveExample("pages/js/object-defineproperty.html")}}
      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/getprototypeof/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/getprototypeof/index.html index b063094f52..8f0ff15f9f 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/getprototypeof/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/getprototypeof/index.html @@ -41,77 +41,11 @@ Object.getPrototypeOf("foo");

      規範

      - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES5.1', '#sec-15.2.3.2', 'Object.getPrototypeOf')}}{{Spec2('ES5.1')}}Initial definition.
      {{SpecName('ES6', '#sec-object.getprototypeof', 'Object.getProtoypeOf')}}{{Spec2('ES6')}} 
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatChrome("5")}}{{CompatGeckoDesktop("1.9.1")}}{{CompatIE("9")}}{{CompatOpera("12.10")}}{{CompatSafari("5")}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
      -
      +{{Compat}}

      Opera 註

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/hasownproperty/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/hasownproperty/index.html index 58fe485c22..41bd582c4e 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/hasownproperty/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/hasownproperty/index.html @@ -96,82 +96,11 @@ Object.prototype.hasOwnProperty.call(foo, 'bar'); // true

      規範

      - - - - - - - - - - - - - - - - - - - - - - - -
      規範狀態
      {{SpecName('ES3')}}{{Spec2('ES3')}}Initial definition. Implemented in JavaScript 1.5.
      {{SpecName('ES5.1', '#sec-15.2.4.5', 'Object.prototype.hasOwnProperty')}}{{Spec2('ES5.1')}} 
      {{SpecName('ES6', '#sec-object.prototype.hasownproperty', 'Object.prototype.hasOwnProperty')}}{{Spec2('ES6')}} 
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/index.html index 40468bd608..89e99e6359 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/index.html @@ -133,87 +133,11 @@ var o = new Object(Boolean());

      規範

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES1')}}{{Spec2('ES1')}}Initial definition. Implemented in JavaScript 1.0.
      {{SpecName('ES5.1', '#sec-15.2', 'Object')}}{{Spec2('ES5.1')}}
      {{SpecName('ES6', '#sec-object-objects', 'Object')}}{{Spec2('ES6')}}Added Object.assign, Object.getOwnPropertySymbols, Object.setPrototypeOf, Object.is
      {{SpecName('ESDraft', '#sec-object-objects', 'Object')}}{{Spec2('ESDraft')}}Added Object.entries, Object.values and Object.getOwnPropertyDescriptors.
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
      -
      +{{Compat}}

      參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/keys/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/keys/index.html index 5bf8e8a559..3be978f7f8 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/keys/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/keys/index.html @@ -119,82 +119,11 @@ if (!Object.keys) {

      規範

      - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES5.1', '#sec-15.2.3.14', 'Object.keys')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.8.5.
      {{SpecName('ES2015', '#sec-object.keys', 'Object.keys')}}{{Spec2('ES2015')}} 
      {{SpecName('ESDraft', '#sec-object.keys', 'Object.keys')}}{{Spec2('ESDraft')}} 
      +{{Specifications}}

      瀏覽器相容性

      -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatChrome("5")}}{{CompatGeckoDesktop("2.0")}}{{CompatIE("9")}}{{CompatOpera("12")}}{{CompatSafari("5")}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
      -
      +{{Compat}}

      參見

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/preventextensions/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/preventextensions/index.html index da1dc83526..2a06e61d0c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/preventextensions/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/preventextensions/index.html @@ -73,99 +73,11 @@ Object.preventExtensions(1);

      規範

      - - - - - - - - - - - - - - - - - - - - - - - -
      SpecificationStatusComment
      {{SpecName('ES5.1', '#sec-15.2.3.10', 'Object.preventExtensions')}}{{Spec2('ES5.1')}}Initial definition. Implemented in JavaScript 1.8.5.
      {{SpecName('ES6', '#sec-object.preventextensions', 'Object.preventExtensions')}}{{Spec2('ES6')}} 
      {{SpecName('ESDraft', '#sec-object.preventextensions', 'Object.preventExtensions')}}{{Spec2('ESDraft')}} 
      - -

      瀏覽器相容度

      - -
      {{CompatibilityTable}}
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
      Basic support{{CompatChrome("6")}}{{CompatGeckoDesktop("2.0")}}{{CompatIE("9")}}{{CompatOpera("12")}}{{CompatSafari("5.1")}}
      ES6 behavior for non-object argument{{CompatChrome("44")}}{{CompatGeckoDesktop("35.0")}}{{CompatIE("11")}}{{CompatOpera("31")}}{{CompatUnknown}}
      -
      - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
      Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
      ES6 behavior for non-object argument{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("35.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
      -
      +{{Specifications}} + +

      瀏覽器相容性

      + +{{Compat}}

      閱讀更多

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/proto/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/proto/index.html index 5ba5c8f615..ebb05d1e1d 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/object/proto/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/object/proto/index.html @@ -3,11 +3,11 @@ title: Object.prototype.__proto__ slug: Web/JavaScript/Reference/Global_Objects/Object/proto translation_of: Web/JavaScript/Reference/Global_Objects/Object/proto --- -
      +

      Warning: 基於現代Javascript引擎最佳化物件屬性存取的方法,改變一個物件的 [[Prototype]] 在任何瀏覽器或是Javascript引擎都是非常慢的操作?。改變繼承屬性對效能的影響微妙且深遠,不僅僅只是影響執行 obj.__proto__ = ... 的時間,而是會影響到所有有存取到被改變 [[Prototype]] 的物件的程式碼的執行時間。如果你在乎效能的話就應該避免改變一個物件的 [[Prototype]] 。反之,請用 {{jsxref("Object.create()")}} 來產生一個擁有 [[Prototype]] 的物件。

      -
      +

      Warning: 雖然 Object.prototype.__proto__ 在今日已經被絕大部分的瀏覽器所支援,其存在與確切的行為只有在 ECMAScript 2015 規範才被標準化成一個歷史功能來確保相容性。為了更好的支援,建議使用{{jsxref("Object.getPrototypeOf()")}}。

      diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html index d1d76d3d80..c4cf9ff4dc 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/promise/finally/index.html @@ -45,8 +45,8 @@ p.finally(function() {
    -
    -

    備註: 在 finally 回呼中使用 throw (或回傳 rejected promise)會導致新的 promise 被 reject , reject 的原因則是呼叫 throw() 時所指定的值。

    +
    +

    備註:在 finally 回呼中使用 throw (或回傳 rejected promise)會導致新的 promise 被 reject , reject 的原因則是呼叫 throw() 時所指定的值。

    Examples

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/index.html index ec38359021..a434a6d4dd 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/promise/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/promise/index.html @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise

    Promise 物件代表一個即將完成、或失敗的非同步操作,以及它所產生的值。

    -
    -

    此條目為介紹 Promise 建構式。要瞭解 Promise 相關使用方式,請先參考使用 Promise。Promise 建構式主要用於包裹尚未支援 Promise 的函式。

    +
    +

    備註:此條目為介紹 Promise 建構式。要瞭解 Promise 相關使用方式,請先參考使用 Promise。Promise 建構式主要用於包裹尚未支援 Promise 的函式。

    {{EmbedInteractiveExample("pages/js/promise-constructor.html")}}
    @@ -42,12 +42,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise

    -
    -

    容易混淆: 許多其他語言擁有機制用來惰性求值(lazy evaluation)及延遲(deferring)運算,它們也被稱作“promises” — e.g. Scheme. 然而在 JavaScript 中 Promises 代表那些(已經)發生中(happening)的程序,它們可以繫結回呼函式。若您要找的是惰性求值表示式,考慮不帶參數的 arrow functionf = () => expression 來建立惰性求值表示式,並透過 f() 進行求值.

    +
    +

    備註: 許多其他語言擁有機制用來惰性求值(lazy evaluation)及延遲(deferring)運算,它們也被稱作“promises” — e.g. Scheme. 然而在 JavaScript 中 Promises 代表那些(已經)發生中(happening)的程序,它們可以繫結回呼函式。若您要找的是惰性求值表示式,考慮不帶參數的 arrow functionf = () => expression 來建立惰性求值表示式,並透過 f() 進行求值.

    -
    -

    Note: 一個被實現或拒絕,但不處於 pending 的 promise 被稱作被解決(settled)。您也會見到使用解決(resolved)一詞來描述 promises — 這代表 promises 被實現(fulfilled)了。States and fates 這篇文章包含了更多 promises 的專有名詞。

    +
    +

    備註:一個被實現或拒絕,但不處於 pending 的 promise 被稱作被解決(settled)。您也會見到使用解決(resolved)一詞來描述 promises — 這代表 promises 被實現(fulfilled)了。States and fates 這篇文章包含了更多 promises 的專有名詞。

    屬性

    @@ -181,7 +181,7 @@ function testPromise() { ') Promise made (<small>Sync code terminated</small>)<br/>'); } -

    *譯註:resolver function 即 executor function。

    +

    *譯註:resolver function 即 executor function。

    if ("Promise" in window) {
       let btn = document.getElementById("btn");
    diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/then/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/then/index.html
    index a77dab8014..3ceb57d196 100644
    --- a/files/zh-tw/web/javascript/reference/global_objects/promise/then/index.html
    +++ b/files/zh-tw/web/javascript/reference/global_objects/promise/then/index.html
    @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/then
     
     

    then() 方法回傳一個 {{domxref("Promise")}} 物件。它接收兩個引數: Promise 在成功及失敗情況時的回呼函式。

    -
    -

    如果有一個或兩個引數被省略,或為非函式(non-functions),則 then 將處於遺失 handler(s) 的狀態,但不會產生錯誤。若發起 then 之 Promise 採取了一個狀態(實現(fulfillment)或拒絕(rejection))而 then 沒有處理它的函式,一個不具有額外 handlers 的新 Promise 物件將被建立,單純採取原 Promise 其最終狀態。

    +
    +

    備註:如果有一個或兩個引數被省略,或為非函式(non-functions),則 then 將處於遺失 handler(s) 的狀態,但不會產生錯誤。若發起 then 之 Promise 採取了一個狀態(實現(fulfillment)或拒絕(rejection))而 then 沒有處理它的函式,一個不具有額外 handlers 的新 Promise 物件將被建立,單純採取原 Promise 其最終狀態。

    語法

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/reflect/index.html b/files/zh-tw/web/javascript/reference/global_objects/reflect/index.html index 03cd63effc..7feb69f921 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/reflect/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/reflect/index.html @@ -46,81 +46,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Reflect

    規範

    - - - - - - - - - - - - - - - - - - -
    SpecificationStatusComment
    {{SpecName('ES2015', '#sec-reflect-object', 'Reflect')}}{{Spec2('ES2015')}}Initial definition.
    {{SpecName('ESDraft', '#sec-reflect-object', 'Reflect')}}{{Spec2('ESDraft')}}Reflect.enumerate has been removed.
    +{{Specifications}}

    瀏覽器相容性

    -

    {{CompatibilityTable}}

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatChrome(49.0)}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("42")}}{{CompatNo}}{{CompatNo}}{{CompatSafari(10)}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatChrome(49.0)}}{{CompatChrome(49.0)}}{{CompatVersionUnknown}}{{CompatGeckoMobile("42")}}{{CompatNo}}{{CompatNo}}{{CompatSafari(10)}}
    -
    +{{Compat}}

    參見

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/set/has/index.html b/files/zh-tw/web/javascript/reference/global_objects/set/has/index.html index c77d2ea99b..9c6fd56418 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/set/has/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/set/has/index.html @@ -32,8 +32,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Set/has

    回傳 true 如果給定值存在在 Set 物件中;反之回傳 false

    -
    -

    Note: 技術上來說,has() 使用了 sameValueZero 算法來判斷給定元素的存在與否。

    +
    +

    備註:技術上來說,has() 使用了 sameValueZero 算法來判斷給定元素的存在與否。

    範例

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/index.html index e29b6b8cea..2c9e419b04 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/index.html @@ -105,8 +105,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String
    -
    -

    和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。

    +
    +

    備註:和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。

    @@ -192,7 +192,7 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"
    console.log(eval(s2.valueOf())); // 回傳數字 4
     
    -
    注意: 對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章StringView – a C-like representation of strings based on typed arrays
    +

    備註:對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章StringView – a C-like representation of strings based on typed arrays

    屬性

    @@ -216,8 +216,8 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"

    String 通用方法

    -
    -

    字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。

    +
    +

    警告:字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。

    The String instance methods are also available in Firefox as of JavaScript 1.6 (though not part of the ECMAScript standard) on the String object for applying String methods to any object:

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html index bb053cd10a..e61013fb77 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html @@ -31,63 +31,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/padStart 'abc'.padStart(6,"123465"); // "123abc"
    -

    Specifications

    +

    規範

    -

    這個方法還沒有被納入 ECMAScript 標準。現在還只是個提案

    +{{Specifications}} -

    Browser compatibility

    +

    瀏覽器相容性

    -
    {{CompatibilityTable}}
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
    Basic support{{CompatChrome(57)}} 15{{CompatGeckoDesktop(51)}}{{CompatNo}}{{CompatOpera(44)}}{{CompatSafari(10)}}
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
    Basic support{{CompatUnknown}}{{CompatChrome(57)}}{{CompatGeckoMobile(51)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatSafari(10)}}
    -
    +{{Compat}}

    See also

    diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html index 1cc9b1abac..b40013644c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

    replace() 方法會傳回一個新字串,此新字串是透過將原字串與 pattern 比對,以 replacement 取代吻合處而生成。pattern 可以是字串或 {{jsxref("RegExp")}},而 replacement 可以是字串或函式(會在每一次匹配時被呼叫)。

    -
    -

    備註:原始的字串會保持不變。

    +
    +

    備註:原始的字串會保持不變。

    語法

    @@ -42,11 +42,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

    The replacement string can include the following special replacement patterns:

    - +
    - - + + @@ -77,11 +77,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

    The arguments to the function are as follows:

    -
    PatternInsertsPatternInserts
    $$
    +
    - - + + 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 49be1c3db0..56c14f39ba 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 @@ -84,12 +84,12 @@ Int8Array.prototype.foo = 'bar';
    Possible nameSupplied valuePossible nameSupplied value
    match
    - - - - - - + + + + + + diff --git a/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html b/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html index f352c84d71..f183c412ce 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/undefined/index.html @@ -26,8 +26,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/undefined

    A variable that has not been assigned a value is of type undefined. A method or statement also returns undefined if the variable that is being evaluated does not have an assigned value. A function returns undefined if a value was not {{jsxref("Statements/return", "returned")}}.

    -
    -

    While it is possible to use it as an {{Glossary("Identifier", "identifier")}} (variable name) in any scope other than the global scope (because undefined is not a {{jsxref("Reserved_Words", "reserved word")}}), doing so is a very bad idea that will make your code difficult to maintain and debug.

    +
    +

    Warning: While it is possible to use it as an {{Glossary("Identifier", "identifier")}} (variable name) in any scope other than the global scope (because undefined is not a {{jsxref("Reserved_Words", "reserved word")}}), doing so is a very bad idea that will make your code difficult to maintain and debug.

    //DON'T DO THIS
     
    @@ -54,8 +54,8 @@ else {
     }
     
    -
    -

    備註:The strict equality operator rather than the standard equality operator must be used here, because x == undefined also checks whether x is null, while strict equality doesn't. null is not equivalent to undefined. See {{jsxref("Operators/Comparison_Operators", "comparison operators")}} for details.

    +
    +

    Note: The strict equality operator rather than the standard equality operator must be used here, because x == undefined also checks whether x is null, while strict equality doesn't. null is not equivalent to undefined. See {{jsxref("Operators/Comparison_Operators", "comparison operators")}} for details.

    Typeof operator and undefined

    -- cgit v1.2.3-54-g00ecf
    TypeValue RangeSize in bytesDescriptionWeb IDL typeEquivalent C typeTypeValue RangeSize in bytesDescriptionWeb IDL typeEquivalent C type
    {{jsxref("Int8Array")}}