aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/javascript/reference
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 13:12:08 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 13:12:08 +0100
commit43a5cac2eff22c21071800e13bef12af9d3a37d0 (patch)
treef6e91f8aa958f15bd0b0aabf7b8dfc09063eceda /files/zh-tw/web/javascript/reference
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.gz
translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.bz2
translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.zip
unslug zh-tw: move
Diffstat (limited to 'files/zh-tw/web/javascript/reference')
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/arraybuffer/prototype/index.html111
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/date/prototype/index.html246
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/function/prototype/index.html139
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/number/prototype/index.html85
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/object/prototype/index.html219
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html65
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/string/prototype/index.html177
-rw-r--r--files/zh-tw/web/javascript/reference/operators/arithmetic_operators/index.html309
-rw-r--r--files/zh-tw/web/javascript/reference/operators/bitwise_operators/index.html555
-rw-r--r--files/zh-tw/web/javascript/reference/operators/comparison_operators/index.html284
-rw-r--r--files/zh-tw/web/javascript/reference/operators/logical_operators/index.html244
11 files changed, 0 insertions, 2434 deletions
diff --git a/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/prototype/index.html
deleted file mode 100644
index 263726d7e0..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/arraybuffer/prototype/index.html
+++ /dev/null
@@ -1,111 +0,0 @@
----
-title: ArrayBuffer.prototype
-slug: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/prototype
-translation_of: Web/JavaScript/Reference/Global_Objects/ArrayBuffer
-translation_of_original: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/prototype
----
-<div>{{JSRef}}</div>
-
-<p>The <strong><code>ArrayBuffer.prototype</code></strong> property represents the prototype for the {{jsxref("ArrayBuffer")}} object.</p>
-
-<div>{{js_property_attributes(0,0,0)}}</div>
-
-<h2 id="描述">描述</h2>
-
-<p><code>ArrayBuffer</code> instances inherit from <code>ArrayBuffer.prototype</code>. As with all constructors, you can change the constructor's prototype object to make changes to all <code>ArrayBuffer</code> instances.</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt>ArrayBuffer.prototype.constructor</dt>
- <dd>Specifies the function that creates an object's prototype. The initial value is the standard built-in <code>ArrayBuffer</code> constructor.</dd>
- <dt>{{jsxref("ArrayBuffer.prototype.byteLength")}} {{readonlyInline}}</dt>
- <dd>陣列大小,以位元組(byte)計算。此屬性在陣列建立之後就不可能改變了。<strong>唯讀</strong>。</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("ArrayBuffer.prototype.slice()")}}</dt>
- <dd>Returns a new <code>ArrayBuffer</code> whose contents are a copy of this <code>ArrayBuffer</code>'s bytes from <code>begin</code>, inclusive, up to <code>end</code>, exclusive. If either <code>begin</code> or <code>end</code> is negative, it refers to an index from the end of the array, as opposed to from the beginning.</dd>
-</dl>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-arraybuffer.prototype', 'ArrayBuffer.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-arraybuffer.prototype', 'ArrayBuffer.prototype')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>7.0</td>
- <td>{{ CompatGeckoDesktop("2")}}</td>
- <td>10</td>
- <td>11.6</td>
- <td>5.1</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>4.0</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("2")}}</td>
- <td>10</td>
- <td>11.6</td>
- <td>4.2</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li>{{jsxref("ArrayBuffer")}}</li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/date/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/date/prototype/index.html
deleted file mode 100644
index 5490743ec0..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/date/prototype/index.html
+++ /dev/null
@@ -1,246 +0,0 @@
----
-title: Date.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Date/prototype
-tags:
- - Date
- - JavaScript
- - 原型
- - 參考資料
- - 屬性
-translation_of: Web/JavaScript/Reference/Global_Objects/Date
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Date/prototype
----
-<div>{{JSRef}}</div>
-
-<p><strong><code>Date.prototype</code></strong> 屬性表示 {{jsxref("Date")}} 建構子的原型。</p>
-
-<div>{{js_property_attributes(0, 0, 1)}}</div>
-
-<h2 id="描述">描述</h2>
-
-<p>JavaScript {{jsxref("Date")}} 實體繼承自 <code>Date.prototype。你可以藉由改變建構子的原型物件,來影響所有繼承自</code> JavaScript {{jsxref("Date")}} 的實體。</p>
-
-<p>為了千年年份(換個說法,考慮現在已到了 2000 年)的相容性,設定上你應該採用完整的年份。舉例來說,使用 1998 而不是 98 。為了讓你能取得完整的年份資料, Javascript 包含了 {{jsxref("Date.prototype.getFullYear()", "getFullYear()")}} , {{jsxref("Date.prototype.setFullYear()", "setFullYear()")}} , {{jsxref("Date.prototype.getUTCFullYear()", "getUTCFullYear()")}} 以及 {{jsxref("Date.prototype.setUTCFullYear()", "setUTCFullYear()")}} 方法。</p>
-
-<p>自 ECMAScript 6 開始, <code>Date.prototype</code> 物件只是個一般物件,而不是一個 {{jsxref("Date")}} 實體。</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt><code>Date.prototype.constructor</code></dt>
- <dd>回傳一個能建立實體的函數,這是 {{jsxref("Date")}} 預設的建構子。</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<h3 id="Getter">Getter</h3>
-
-<dl>
- <dt>{{jsxref("Date.prototype.getDate()")}}</dt>
- <dd>回傳本地時間月份中的日期(1-31)。</dd>
- <dt>{{jsxref("Date.prototype.getDay()")}}</dt>
- <dd>回傳本地時間星期中的日子(0-6)。</dd>
- <dt>{{jsxref("Date.prototype.getFullYear()")}}</dt>
- <dd>回傳本地時間的年份( 以 4 位數表現)。</dd>
- <dt>{{jsxref("Date.prototype.getHours()")}}</dt>
- <dd>回傳本地時間的小時(0-23)。</dd>
- <dt>{{jsxref("Date.prototype.getMilliseconds()")}}</dt>
- <dd>回傳本地時間的毫秒數(0-999)。</dd>
- <dt>{{jsxref("Date.prototype.getMinutes()")}}</dt>
- <dd>回傳本地時間的分鐘數(0-59)。</dd>
- <dt>{{jsxref("Date.prototype.getMonth()")}}</dt>
- <dd>回傳本地時間的月份(0-11)。</dd>
- <dt>{{jsxref("Date.prototype.getSeconds()")}}</dt>
- <dd>回傳本地時間的秒數(0-59)。</dd>
- <dt>{{jsxref("Date.prototype.getTime()")}}</dt>
- <dd>回傳由 1970-01-01 00:00:00 UTC 開始,到代表時間經過的毫秒數(以負值表示 1970 年之前的時間)。</dd>
- <dt>{{jsxref("Date.prototype.getTimezoneOffset()")}}</dt>
- <dd>回傳本地時差為多少分鐘。</dd>
- <dt>{{jsxref("Date.prototype.getUTCDate()")}}</dt>
- <dd>回傳標準時間的在月份中的日期(1-31)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCDay()")}}</dt>
- <dd>回傳標準時間在星期中的日子(0-6)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCFullYear()")}}</dt>
- <dd>回傳標準時間的年份( 以 4 位數表現)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCHours()")}}</dt>
- <dd>回傳標準時間的小時數(0-23)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCMilliseconds()")}}</dt>
- <dd>回傳標準時間裡的毫秒數(0-999)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCMinutes()")}}</dt>
- <dd>回傳標準時間的分鐘數(0-59)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCMonth()")}}</dt>
- <dd>回傳標準時間的月份數(0-11)。</dd>
- <dt>{{jsxref("Date.prototype.getUTCSeconds()")}}</dt>
- <dd>回傳標準時間的秒數(0-59)。</dd>
- <dt>{{jsxref("Date.prototype.getYear()")}} {{deprecated_inline}}</dt>
- <dd>回本地時間的年份(通常 2-3 位數)。用 {{jsxref("Date.prototype.getFullYear()", "getFullYear()")}} 取代。</dd>
-</dl>
-
-<h3 id="Setter">Setter</h3>
-
-<dl>
- <dt>{{jsxref("Date.prototype.setDate()")}}</dt>
- <dd>設定本地時間月份中的日期。</dd>
- <dt>{{jsxref("Date.prototype.setFullYear()")}}</dt>
- <dd>設定本地時間的完整年份(以 4 位數表達 4 位數年份)。</dd>
- <dt>{{jsxref("Date.prototype.setHours()")}}</dt>
- <dd>設定本地時間的小時數。</dd>
- <dt>{{jsxref("Date.prototype.setMilliseconds()")}}</dt>
- <dd>設定本地時間的毫秒數。</dd>
- <dt>{{jsxref("Date.prototype.setMinutes()")}}</dt>
- <dd>設定本地時間的分鐘數。</dd>
- <dt>{{jsxref("Date.prototype.setMonth()")}}</dt>
- <dd>設定本地時間的月份。</dd>
- <dt>{{jsxref("Date.prototype.setSeconds()")}}</dt>
- <dd>設定本地時間的秒數。</dd>
- <dt>{{jsxref("Date.prototype.setTime()")}}</dt>
- <dd>設定這個 {{jsxref("Date")}} 物件距 1970-01-01 00:00:00 UTC 的毫秒數,允許使用負值表示之前的時間。</dd>
- <dt>{{jsxref("Date.prototype.setUTCDate()")}}</dt>
- <dd>設定標準時間月份中的日期。</dd>
- <dt>{{jsxref("Date.prototype.setUTCFullYear()")}}</dt>
- <dd>設定標準時間的完整年份(以 4 位數表示 4 位數年分)。</dd>
- <dt>{{jsxref("Date.prototype.setUTCHours()")}}</dt>
- <dd>設定標準時間的小時數。</dd>
- <dt>{{jsxref("Date.prototype.setUTCMilliseconds()")}}</dt>
- <dd>設定標準時間的毫秒數。</dd>
- <dt>{{jsxref("Date.prototype.setUTCMinutes()")}}</dt>
- <dd>設定標準時間的分鐘數。</dd>
- <dt>{{jsxref("Date.prototype.setUTCMonth()")}}</dt>
- <dd>設定標準時間的月份數。</dd>
- <dt>{{jsxref("Date.prototype.setUTCSeconds()")}}</dt>
- <dd>設定標準時間的秒數。</dd>
- <dt>{{jsxref("Date.prototype.setYear()")}} {{deprecated_inline}}</dt>
- <dd>設定本地時間的年份(使用 2-3 位數)。使用 {{jsxref("Date.prototype.setFullYear()", "setFullYear()")}} 取代。</dd>
-</dl>
-
-<h3 id="Conversion_getter">Conversion getter</h3>
-
-<dl>
- <dt>{{jsxref("Date.prototype.toDateString()")}}</dt>
- <dd>以可閱讀的字串型式,回傳 {{jsxref("Date")}} 的部分資訊。</dd>
- <dt>{{jsxref("Date.prototype.toISOString()")}}</dt>
- <dd>將日期時間轉換成 ISO 8601 格式的字串回傳。</dd>
- <dt>{{jsxref("Date.prototype.toJSON()")}}</dt>
- <dd>回傳等義於 {{jsxref("Date")}} 物件使用 {{jsxref("Date.prototype.toISOString()", "toISOString()")}} 方法的結果。特別使用 {{jsxref("JSON.stringify()")}} 處理。</dd>
- <dt>{{jsxref("Date.prototype.toGMTString()")}} {{deprecated_inline}}</dt>
- <dd>回傳 {{jsxref("Date")}} 以 GMT (UT) 時區基準代表的時間字串。使用 {{jsxref("Date.prototype.toUTCString()", "toUTCString()")}} 方法來取代。</dd>
- <dt>{{jsxref("Date.prototype.toLocaleDateString()")}}</dt>
- <dd>依照系統的時間地區設定,回傳日期字串。</dd>
- <dt>{{jsxref("Date.prototype.toLocaleFormat()")}} {{non-standard_inline}}</dt>
- <dd>傳入格式化字串參數,將日期時間轉換成指定格式的字串。</dd>
- <dt>{{jsxref("Date.prototype.toLocaleString()")}}</dt>
- <dd>回傳依系統的地區設定導出的日期時間字串。覆寫自 {{jsxref("Object.prototype.toLocaleString()")}} 方法。</dd>
- <dt>{{jsxref("Date.prototype.toLocaleTimeString()")}}</dt>
- <dd>回傳依系統的地區設定導出的時間字串。</dd>
- <dt>{{jsxref("Date.prototype.toSource()")}} {{non-standard_inline}}</dt>
- <dd>回傳一個建立相同 {{jsxref("Date")}} 物件的程式碼字串;你可以拿這個結果來建立新物件。覆寫自 {{jsxref("Object.prototype.toSource()")}} 方法。</dd>
- <dt>{{jsxref("Date.prototype.toString()")}}</dt>
- <dd>回傳代表此 {{jsxref("Date")}} 物件的字串。覆寫自 {{jsxref("Object.prototype.toString()")}} 方法。</dd>
- <dt>{{jsxref("Date.prototype.toTimeString()")}}</dt>
- <dd>以人類可讀的格式,回傳時間部分的字串。</dd>
- <dt>{{jsxref("Date.prototype.toUTCString()")}}</dt>
- <dd>依 UTC 時區,轉換出時間日期字串。</dd>
- <dt>{{jsxref("Date.prototype.valueOf()")}}</dt>
- <dd>回傳 {{jsxref("Date")}} 物件的原始數值。覆寫自 {{jsxref("Object.prototype.valueOf()")}} 方法。</dd>
-</dl>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">規範</th>
- <th scope="col">狀態</th>
- <th scope="col">註</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>初步定義。實作在 JavaScript 1.1.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.9.5', 'Date.prototype')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-properties-of-the-date-prototype-object', 'Date.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-properties-of-the-date-prototype-object', 'Date.prototype')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>平台</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>基本支援</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td>一般物件</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatGeckoDesktop("41")}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>平台</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>基本支援</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td>一般物件</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatGeckoMobile("41")}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/function/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/function/prototype/index.html
deleted file mode 100644
index 718454721b..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/function/prototype/index.html
+++ /dev/null
@@ -1,139 +0,0 @@
----
-title: Function.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Function/prototype
-translation_of: Web/JavaScript/Reference/Global_Objects/Function
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Function/prototype
----
-<div>{{JSRef}}</div>
-
-<p><code><strong>Function.prototype</strong></code> 屬性表示 {{jsxref("Function")}} 的原型物件。</p>
-
-<h2 id="描述">描述</h2>
-
-<p>{{jsxref("Function")}} objects inherit from <code>Function.prototype</code>.  <code>Function.prototype</code> cannot be modified.</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt>{{jsxref("Function.arguments")}} {{deprecated_inline}}</dt>
- <dd>An array corresponding to the arguments passed to a function. This is deprecated as property of {{jsxref("Function")}}, use the {{jsxref("Functions/arguments", "arguments")}} object available within the function instead.</dd>
- <dt><s class="obsoleteElement">{{jsxref("Function.arity")}} {{obsolete_inline}}</s></dt>
- <dd><s class="obsoleteElement">Used to specifiy the number of arguments expected by the function, but has been removed. Use the {{jsxref("Function.length", "length")}} property instead.</s></dd>
- <dt>{{jsxref("Function.caller")}} {{non-standard_inline}}</dt>
- <dd>Specifies the function that invoked the currently executing function.</dd>
- <dt>{{jsxref("Function.length")}}</dt>
- <dd>Specifies the number of arguments expected by the function.</dd>
- <dt>{{jsxref("Function.name")}}</dt>
- <dd>The name of the function.</dd>
- <dt>{{jsxref("Function.displayName")}} {{non-standard_inline}}</dt>
- <dd>The display name of the function.</dd>
- <dt><code>Function.prototype.constructor</code></dt>
- <dd>Specifies the function that creates an object's prototype. See {{jsxref("Object.prototype.constructor")}} for more details.</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("Function.prototype.apply()")}}</dt>
- <dd>Calls a function and sets its <em>this</em> to the provided value, arguments can be passed as an {{jsxref("Array")}} object.</dd>
- <dt>{{jsxref("Function.prototype.bind()")}}</dt>
- <dd>Creates a new function which, when called, has its <em>this</em> set to the provided value, with a given sequence of arguments preceding any provided when the new function was called.</dd>
- <dt>{{jsxref("Function.prototype.call()")}}</dt>
- <dd>Calls (executes) a function and sets its <em>this</em> to the provided value, arguments can be passed as they are.</dd>
- <dt>{{jsxref("Function.prototype.isGenerator()")}} {{non-standard_inline}}</dt>
- <dd>Returns <code>true</code> if the function is a <a href="/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators">generator</a>; otherwise returns <code>false</code>.</dd>
- <dt>{{jsxref("Function.prototype.toSource()")}} {{non-standard_inline}}</dt>
- <dd>Returns a string representing the source code of the function. Overrides the {{jsxref("Object.prototype.toSource")}} method.</dd>
- <dt>{{jsxref("Function.prototype.toString()")}}</dt>
- <dd>Returns a string representing the source code of the function. Overrides the {{jsxref("Object.prototype.toString")}} method.</dd>
-</dl>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition. Implemented in JavaScript 1.1</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.3.5.2', 'Function.prototype')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-function-instances-prototype', 'Function.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-function-instances-prototype', 'Function.prototype')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li>{{jsxref("Function")}}</li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/number/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/number/prototype/index.html
deleted file mode 100644
index bfd57f3d21..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/number/prototype/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
----
-title: Number.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Number/prototype
-translation_of: Web/JavaScript/Reference/Global_Objects/Number
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Number/prototype
----
-<div>{{JSRef}}</div>
-
-<p><strong><code>Number.prototype</code></strong> 屬性用來表示 {{jsxref("Number")}} 建構式的原型。</p>
-
-<div>{{js_property_attributes(0, 0, 0)}}</div>
-
-<h2 id="說明">說明</h2>
-
-<p>所有 {{jsxref("Number")}} 實體都繼承自 <code>Number.prototype</code> 。{{jsxref("Number")}} 建構式的原型物件可以被修改並作用在所有 {{jsxref("Number")}} 實體。</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt><code>Number.prototype.constructor</code></dt>
- <dd>回傳建立這個物件實體的建構式。預設為 {{jsxref("Number")}} 物件。</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("Number.prototype.toExponential()")}}</dt>
- <dd>回傳以「科學記數法」表示的數值字串。</dd>
- <dt>{{jsxref("Number.prototype.toFixed()")}}</dt>
- <dd>回傳以定點表示的數值字串。</dd>
- <dt>{{jsxref("Number.prototype.toLocaleString()")}}</dt>
- <dd>回傳以當地語言為主的數值字串。這覆寫 {{jsxref("Object.prototype.toLocaleString()")}} 的方法。</dd>
- <dt>{{jsxref("Number.prototype.toPrecision()")}}</dt>
- <dd>回傳以定點或科學記數表示的數值字串。</dd>
- <dt>{{jsxref("Number.prototype.toSource()")}} {{non-standard_inline}}</dt>
- <dd>Returns an object literal representing the specified {{jsxref("Number")}} object; you can use this value to create a new object. Overrides the {{jsxref("Object.prototype.toSource()")}} method.</dd>
- <dt>{{jsxref("Number.prototype.toString()")}}</dt>
- <dd>回傳以特定基數表示的數值字串。這覆寫 {{jsxref("Object.prototype.toString()")}} 的方法 。</dd>
- <dt>{{jsxref("Number.prototype.valueOf()")}}</dt>
- <dd>回傳這個物件的原始型別,即原始數值。這覆寫 {{jsxref("Object.prototype.valueOf()")}} 。</dd>
-</dl>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">規範</th>
- <th scope="col">狀態</th>
- <th scope="col">註記</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition. Implemented in JavaScript 1.1.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.7.4', 'Number')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-properties-of-the-number-prototype-object', 'Number')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-properties-of-the-number-prototype-object', 'Number')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.Number.prototype")}}</p>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li>{{jsxref("Number")}}</li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/object/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/object/prototype/index.html
deleted file mode 100644
index 4365b10c61..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/object/prototype/index.html
+++ /dev/null
@@ -1,219 +0,0 @@
----
-title: Object.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Object/prototype
-tags:
- - JavaScript
- - Object
- - 待翻譯
-translation_of: Web/JavaScript/Reference/Global_Objects/Object
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Object/prototype
----
-<div>{{JSRef}}</div>
-
-<p><code><strong>Object.prototype</strong></code> 代表 {{jsxref("Object")}} 的原型物件。</p>
-
-<div>{{js_property_attributes(0, 0, 0)}}</div>
-
-<h2 id="描述">描述</h2>
-
-<p>All objects in JavaScript are descended from {{jsxref("Object")}}; all objects inherit methods and properties from <code>Object.prototype</code>, although they may be overridden (except an <code>Object</code> with a <code>null</code> prototype, i.e. <code>Object.create(null)</code>). For example, other constructors' prototypes override the <code>constructor</code> property and provide their own {{jsxref("Object.prototype.toString()", "toString()")}} methods. Changes to the <code>Object</code> prototype object are propagated to all objects unless the properties and methods subject to those changes are overridden further along the prototype chain.</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt>{{jsxref("Object.prototype.constructor")}}</dt>
- <dd>Specifies the function that creates an object's prototype.</dd>
- <dt>{{jsxref("Object.prototype.__proto__")}} {{non-standard_inline}}</dt>
- <dd>Points to the object which was used as prototype when the object was instantiated.</dd>
- <dt>{{jsxref("Object.prototype.__noSuchMethod__")}} {{non-standard_inline}}</dt>
- <dd>Allows a function to be defined that will be executed when an undefined object member is called as a method.</dd>
- <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__count__")}} {{obsolete_inline}}</s></dt>
- <dd><s class="obsoleteElement">Used to return the number of enumerable properties directly on a user-defined object, but has been removed.</s></dd>
- <dt><s class="obsoleteElement">{{jsxref("Object.prototype.__parent__")}} {{obsolete_inline}}</s></dt>
- <dd><s class="obsoleteElement">Used to point to an object's context, but has been removed.</s></dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("Object.prototype.__defineGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
- <dd>Associates a function with a property that, when accessed, executes that function and returns its return value.</dd>
- <dt>{{jsxref("Object.prototype.__defineSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
- <dd>Associates a function with a property that, when set, executes that function which modifies the property.</dd>
- <dt>{{jsxref("Object.prototype.__lookupGetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
- <dd>Returns the function associated with the specified property by the {{jsxref("Object.defineGetter", "__defineGetter__")}} method.</dd>
- <dt>{{jsxref("Object.prototype.__lookupSetter__()")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
- <dd>Returns the function associated with the specified property by the {{jsxref("Object.defineSetter", "__defineSetter__")}} method.</dd>
- <dt>{{jsxref("Object.prototype.hasOwnProperty()")}}</dt>
- <dd>Returns a boolean indicating whether an object contains the specified property as a direct property of that object and not inherited through the prototype chain.</dd>
- <dt>{{jsxref("Object.prototype.isPrototypeOf()")}}</dt>
- <dd>Returns a boolean indication whether the specified object is in the prototype chain of the object this method is called upon.</dd>
- <dt>{{jsxref("Object.prototype.propertyIsEnumerable()")}}</dt>
- <dd>Returns a boolean indicating if the internal <a href="/en-US/docs/ECMAScript_DontEnum_attribute" title="ECMAScript_DontEnum_attribute">ECMAScript DontEnum attribute</a> is set.</dd>
- <dt>{{jsxref("Object.prototype.toSource()")}} {{non-standard_inline}}</dt>
- <dd>Returns string containing the source of an object literal representing the object that this method is called upon; you can use this value to create a new object.</dd>
- <dt>{{jsxref("Object.prototype.toLocaleString()")}}</dt>
- <dd>Calls {{jsxref("Object.toString", "toString()")}}.</dd>
- <dt>{{jsxref("Object.prototype.toString()")}}</dt>
- <dd>Returns a string representation of the object.</dd>
- <dt>{{jsxref("Object.prototype.unwatch()")}} {{non-standard_inline}}</dt>
- <dd>Removes a watchpoint from a property of the object.</dd>
- <dt>{{jsxref("Object.prototype.valueOf()")}}</dt>
- <dd>Returns the primitive value of the specified object.</dd>
- <dt>{{jsxref("Object.prototype.watch()")}} {{non-standard_inline}}</dt>
- <dd>Adds a watchpoint to a property of the object.</dd>
- <dt><s class="obsoleteElement">{{jsxref("Object.prototype.eval()")}} {{obsolete_inline}}</s></dt>
- <dd><s class="obsoleteElement">Used to evaluate a string of JavaScript code in the context of the specified object, but has been removed.</s></dd>
-</dl>
-
-<h2 id="範例">範例</h2>
-
-<p>因為 JavaScript 並沒有子類別的物件,所以原型是個很有用的解決辦法, 使某些函數作為物件的基本類別物件。例如:</p>
-
-<pre class="brush: js">var Person = function() {
- this.canTalk = true;
-};
-
-Person.prototype.greet = function() {
- if (this.canTalk) {
- console.log('Hi, I am ' + this.name);
- }
-};
-
-var Employee = function(name, title) {
- Person.call(this);
- this.name = name;
- this.title = title;
-};
-
-Employee.prototype = Object.create(Person.prototype);
-Employee.prototype.constructor = Employee;
-
-Employee.prototype.greet = function() {
- if (this.canTalk) {
- console.log('Hi, I am ' + this.name + ', the ' + this.title);
- }
-};
-
-var Customer = function(name) {
- Person.call(this);
- this.name = name;
-};
-
-Customer.prototype = Object.create(Person.prototype);
-Customer.prototype.constructor = Customer;
-
-var Mime = function(name) {
- Person.call(this);
- this.name = name;
- this.canTalk = false;
-};
-
-Mime.prototype = Object.create(Person.prototype);
-Mime.prototype.constructor = Mime;
-
-var bob = new Employee('Bob', 'Builder');
-var joe = new Customer('Joe');
-var rg = new Employee('Red Green', 'Handyman');
-var mike = new Customer('Mike');
-var mime = new Mime('Mime');
-
-bob.greet();
-// Hi, I am Bob, the Builder
-
-joe.greet();
-// Hi, I am Joe
-
-rg.greet();
-// Hi, I am Red Green, the Handyman
-
-mike.greet();
-// Hi, I am Mike
-
-mime.greet();
-</pre>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition. Implemented in JavaScript 1.0.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.2.3.1', 'Object.prototype')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-object.prototype', 'Object.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li><a href="/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript">Introduction to Object-Oriented JavaScript</a></li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html
deleted file mode 100644
index f93572bea3..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/promise/prototype/index.html
+++ /dev/null
@@ -1,65 +0,0 @@
----
-title: Promise.prototype
-slug: Web/JavaScript/Reference/Global_Objects/Promise/prototype
-translation_of: Web/JavaScript/Reference/Global_Objects/Promise
-translation_of_original: Web/JavaScript/Reference/Global_Objects/Promise/prototype
----
-<div>{{JSRef}}</div>
-
-<p><code><strong>Promise</strong></code><strong><code>.prototype</code></strong> 屬性代表了 {{jsxref("Promise")}} 建構式的原型物件。</p>
-
-<div>{{js_property_attributes(0,0,0)}}</div>
-
-<h2 id="描述">描述</h2>
-
-<p>所有 {{jsxref("Promise")}} 實例都繼承自 {{jsxref("Promise.prototype")}}。您可以使用建構式的原型物件來增加屬性或方法到所有的 <code>Promise</code> 實例。</p>
-
-<h2 id="屬性">屬性</h2>
-
-<dl>
- <dt><code>Promise.prototype.constructor</code></dt>
- <dd>回傳一個建立實例原型(instance's prototype)的函式。預設為 {{jsxref("Promise")}} 函數。</dd>
-</dl>
-
-<h2 id="方法">方法</h2>
-
-<dl>
- <dt>{{jsxref("Promise.catch", "Promise.prototype.catch(onRejected)")}}</dt>
- <dd>繫結一個拒絕回呼函式(rejection handler callback)到 promise,當它被呼叫時回傳一個以回傳值作解析的新 promise,或者當 promise 被實現時以原值作解析。</dd>
- <dt>{{jsxref("Promise.then", "Promise.prototype.then(onFulfilled, onRejected)")}}</dt>
- <dd>繫結實現或拒絕回呼函式到 promise,回傳一個以 handler 之回傳值作解析的新 promise,或者當 promise 未處理(not handled)時以原值作解析。(i.e. 比如相關聯的 <code>onFulfilled</code> 或 <code>onRejected</code> 不是函式。)</dd>
-</dl>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-promise.prototype', 'Promise.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-promise.prototype', 'Promise.prototype')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<p class="hidden">To contribute to this compatibility data, please write a pull request against this file: <a href="https://github.com/mdn/browser-compat-data/blob/master/javascript/promise.json">https://github.com/mdn/browser-compat-data/blob/master/javascript/promise.json</a>.</p>
-
-<p>{{Compat("javascript/promise","Promise.prototype")}}</p>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li>{{jsxref("Promise")}}</li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/prototype/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/prototype/index.html
deleted file mode 100644
index 011c61418e..0000000000
--- a/files/zh-tw/web/javascript/reference/global_objects/string/prototype/index.html
+++ /dev/null
@@ -1,177 +0,0 @@
----
-title: String.prototype
-slug: Web/JavaScript/Reference/Global_Objects/String/prototype
-translation_of: Web/JavaScript/Reference/Global_Objects/String
-translation_of_original: Web/JavaScript/Reference/Global_Objects/String/prototype
----
-<div>{{JSRef}}</div>
-
-<p>The <strong><code>String.prototype</code></strong> property represents the {{jsxref("String")}} prototype object.</p>
-
-<div>{{js_property_attributes(0, 0, 0)}}</div>
-
-<h2 id="Description">Description</h2>
-
-<p>All {{jsxref("String")}} instances inherit from <code>String.prototype</code>. Changes to the <code>String</code> prototype object are propagated to all {{jsxref("String")}} instances.</p>
-
-<h2 id="Properties">Properties</h2>
-
-<dl>
- <dt><code>String.prototype.constructor</code></dt>
- <dd>Specifies the function that creates an object's prototype.</dd>
- <dt>{{jsxref("String.prototype.length")}}</dt>
- <dd>Reflects the length of the string.</dd>
- <dt><code><em>N</em></code></dt>
- <dd>Used to access the character in the <em>N</em>th position where <em>N</em> is a positive integer between 0 and one less than the value of {{jsxref("String.length", "length")}}. These properties are read-only.</dd>
-</dl>
-
-<h2 id="Methods">Methods</h2>
-
-<h3 id="Methods_unrelated_to_HTML">Methods unrelated to HTML</h3>
-
-<dl>
- <dt>{{jsxref("String.prototype.charAt()")}}</dt>
- <dd>Returns the character (exactly one UTF-16 code unit) at the specified index.</dd>
- <dt>{{jsxref("String.prototype.charCodeAt()")}}</dt>
- <dd>Returns a number that is the UTF-16 code unit value at the given index.</dd>
- <dt>{{jsxref("String.prototype.codePointAt()")}}</dt>
- <dd>Returns a nonnegative integer Number that is the code point value of the UTF-16 encoded code point starting at the specified index.</dd>
- <dt>{{jsxref("String.prototype.concat()")}}</dt>
- <dd>Combines the text of two strings and returns a new string.</dd>
- <dt>{{jsxref("String.prototype.includes()")}}</dt>
- <dd>Determines whether one string may be found within another string.</dd>
- <dt>{{jsxref("String.prototype.endsWith()")}}</dt>
- <dd>Determines whether a string ends with the characters of another string.</dd>
- <dt>{{jsxref("String.prototype.indexOf()")}}</dt>
- <dd>Returns the index within the calling {{jsxref("String")}} object of the first occurrence of the specified value, or -1 if not found.</dd>
- <dt>{{jsxref("String.prototype.lastIndexOf()")}}</dt>
- <dd>Returns the index within the calling {{jsxref("String")}} object of the last occurrence of the specified value, or -1 if not found.</dd>
- <dt>{{jsxref("String.prototype.localeCompare()")}}</dt>
- <dd>Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.</dd>
- <dt>{{jsxref("String.prototype.match()")}}</dt>
- <dd>Used to match a regular expression against a string.</dd>
- <dt>{{jsxref("String.prototype.normalize()")}}</dt>
- <dd>Returns the Unicode Normalization Form of the calling string value.</dd>
- <dt>{{jsxref("String.prototype.padEnd()")}}</dt>
- <dd>Pads the current string from the end with a given string to create a new string from a given length.</dd>
- <dt>{{jsxref("String.prototype.padStart()")}}</dt>
- <dd>Pads the current string from the start with a given string to create a new string from a given length.</dd>
- <dt><s class="obsoleteElement">{{jsxref("String.prototype.quote()")}} {{obsolete_inline}}</s></dt>
- <dd><s class="obsoleteElement">Wraps the string in double quotes ("<code>"</code>").</s></dd>
- <dt>{{jsxref("String.prototype.repeat()")}}</dt>
- <dd>Returns a string consisting of the elements of the object repeated the given times.</dd>
- <dt>{{jsxref("String.prototype.replace()")}}</dt>
- <dd>Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.</dd>
- <dt>{{jsxref("String.prototype.search()")}}</dt>
- <dd>Executes the search for a match between a regular expression and a specified string.</dd>
- <dt>{{jsxref("String.prototype.slice()")}}</dt>
- <dd>Extracts a section of a string and returns a new string.</dd>
- <dt>{{jsxref("String.prototype.split()")}}</dt>
- <dd>Splits a {{jsxref("Global_Objects/String", "String")}} object into an array of strings by separating the string into substrings.</dd>
- <dt>{{jsxref("String.prototype.startsWith()")}}</dt>
- <dd>Determines whether a string begins with the characters of another string.</dd>
- <dt>{{jsxref("String.prototype.substr()")}}</dt>
- <dd>Returns the characters in a string beginning at the specified location through the specified number of characters.</dd>
- <dt>{{jsxref("String.prototype.substring()")}}</dt>
- <dd>Returns the characters in a string between two indexes into the string.</dd>
- <dt>{{jsxref("String.prototype.toLocaleLowerCase()")}}</dt>
- <dd>The characters within a string are converted to lower case while respecting the current locale. For most languages, this will return the same as {{jsxref("String.prototype.toLowerCase()", "toLowerCase()")}}.</dd>
- <dt>{{jsxref("String.prototype.toLocaleUpperCase()")}}</dt>
- <dd>The characters within a string are converted to upper case while respecting the current locale. For most languages, this will return the same as {{jsxref("String.prototype.toUpperCase()", "toUpperCase()")}}.</dd>
- <dt>{{jsxref("String.prototype.toLowerCase()")}}</dt>
- <dd>Returns the calling string value converted to lower case.</dd>
- <dt>{{jsxref("String.prototype.toSource()")}} {{non-standard_inline}}</dt>
- <dd>Returns an object literal representing the specified object; you can use this value to create a new object. Overrides the {{jsxref("Object.prototype.toSource()")}} method.</dd>
- <dt>{{jsxref("String.prototype.toString()")}}</dt>
- <dd>Returns a string representing the specified object. Overrides the {{jsxref("Object.prototype.toString()")}} method.</dd>
- <dt>{{jsxref("String.prototype.toUpperCase()")}}</dt>
- <dd>Returns the calling string value converted to uppercase.</dd>
- <dt>{{jsxref("String.prototype.trim()")}}</dt>
- <dd>Trims whitespace from the beginning and end of the string. Part of the ECMAScript 5 standard.</dd>
- <dt>{{jsxref("String.prototype.trimLeft()")}} {{non-standard_inline}}</dt>
- <dd>Trims whitespace from the left side of the string.</dd>
- <dt>{{jsxref("String.prototype.trimRight()")}} {{non-standard_inline}}</dt>
- <dd>Trims whitespace from the right side of the string.</dd>
- <dt>{{jsxref("String.prototype.valueOf()")}}</dt>
- <dd>Returns the primitive value of the specified object. Overrides the {{jsxref("Object.prototype.valueOf()")}} method.</dd>
- <dt>{{jsxref("String.prototype.@@iterator()", "String.prototype[@@iterator]()")}}</dt>
- <dd>Returns a new <code>Iterator</code> object that iterates over the code points of a String value, returning each code point as a String value.</dd>
-</dl>
-
-<h3 id="HTML_wrapper_methods">HTML wrapper methods</h3>
-
-<p>These methods are of limited use, as they provide only a subset of the available HTML tags and attributes.</p>
-
-<dl>
- <dt>{{jsxref("String.prototype.anchor()")}}</dt>
- <dd>{{htmlattrxref("name", "a", "&lt;a name=\"name\"&gt;")}} (hypertext target)</dd>
- <dt>{{jsxref("String.prototype.big()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("big")}}</dd>
- <dt>{{jsxref("String.prototype.blink()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("blink")}}</dd>
- <dt>{{jsxref("String.prototype.bold()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("b")}}</dd>
- <dt>{{jsxref("String.prototype.fixed()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("tt")}}</dd>
- <dt>{{jsxref("String.prototype.fontcolor()")}} {{deprecated_inline}}</dt>
- <dd>{{htmlattrxref("color", "font", "&lt;font color=\"color\"&gt;")}}</dd>
- <dt>{{jsxref("String.prototype.fontsize()")}} {{deprecated_inline}}</dt>
- <dd>{{htmlattrxref("size", "font", "&lt;font size=\"size\"&gt;")}}</dd>
- <dt>{{jsxref("String.prototype.italics()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("i")}}</dd>
- <dt>{{jsxref("String.prototype.link()")}}</dt>
- <dd>{{htmlattrxref("href", "a", "&lt;a href=\"url\"&gt;")}} (link to URL)</dd>
- <dt>{{jsxref("String.prototype.small()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("small")}}</dd>
- <dt>{{jsxref("String.prototype.strike()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("strike")}}</dd>
- <dt>{{jsxref("String.prototype.sub()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("sub")}}</dd>
- <dt>{{jsxref("String.prototype.sup()")}} {{deprecated_inline}}</dt>
- <dd>{{HTMLElement("sup")}}</dd>
-</dl>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.5.3.1', 'String.prototype')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype', 'String.prototype')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype', 'String.prototype')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.String.prototype")}}</p>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li>{{jsxref("String")}}</li>
- <li>{{jsxref("Function.prototype")}}</li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/operators/arithmetic_operators/index.html b/files/zh-tw/web/javascript/reference/operators/arithmetic_operators/index.html
deleted file mode 100644
index 050c362008..0000000000
--- a/files/zh-tw/web/javascript/reference/operators/arithmetic_operators/index.html
+++ /dev/null
@@ -1,309 +0,0 @@
----
-title: 算術運算子
-slug: Web/JavaScript/Reference/Operators/Arithmetic_Operators
-translation_of: Web/JavaScript/Reference/Operators
-translation_of_original: Web/JavaScript/Reference/Operators/Arithmetic_Operators
----
-<div>{{jsSidebar("Operators")}}</div>
-
-<p><strong>算術運算子接受數值(資料型態為字串或變數都可)作為其運算子並回傳單個數值。 標準算術運算符號有加號(+),減號( - ),乘(*)和除(/)。</strong></p>
-
-<div>{{EmbedInteractiveExample("pages/js/expressions-arithmetic.html")}}</div>
-
-
-
-<h2 id="Addition_()"><a id="加法" name="加法">Addition (+)</a></h2>
-
-<p>加法運算子生成數字(運算元)的總和或字串串接。</p>
-
-<h3 id="Syntax">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x + y
-</pre>
-
-<h3 id="Examples">Examples</h3>
-
-<pre class="brush: js">// Number + Number -&gt; addition
-1 + 2 // 3
-
-// Boolean + Number -&gt; addition
-true + 1 // 2
-
-// Boolean + Boolean -&gt; addition
-false + false // 0
-
-// Number + String -&gt; concatenation
-5 + 'foo' // "5foo"
-
-// String + Boolean -&gt; concatenation
-'foo' + false // "foofalse"
-
-// String + String -&gt; concatenation
-'foo' + 'bar' // "foobar"
-</pre>
-
-<h2 id="Subtraction_(-)"><a id="減法" name="減法">Subtraction (-)</a></h2>
-
-<p>減法運算子能算出兩個運算元間的差異。</p>
-
-<h3 id="Syntax_2">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x - y
-</pre>
-
-<h3 id="Examples_2">Examples</h3>
-
-<pre class="brush: js">5 - 3 // 2
-3 - 5 // -2
-'foo' - 3 // NaN</pre>
-
-<h2 id="Division_()"><a id="除法" name="除法">Division (/)</a></h2>
-
-<p>The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.</p>
-
-<h3 id="Syntax_3">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x / y
-</pre>
-
-<h3 id="Examples_3">Examples</h3>
-
-<pre class="brush: js">1 / 2 // returns 0.5 in JavaScript
-1 / 2 // returns 0 in Java
-// (neither number is explicitly a floating point number)
-
-1.0 / 2.0 // returns 0.5 in both JavaScript and Java
-
-2.0 / 0 // returns Infinity in JavaScript
-2.0 / 0.0 // returns Infinity too
-2.0 / -0.0 // returns -Infinity in JavaScript</pre>
-
-<h2 id="Multiplication_(*)"><a id="乘法" name="乘法">Multiplication (*)</a></h2>
-
-<p>The multiplication operator produces the product of the operands.</p>
-
-<h3 id="Syntax_4">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x * y
-</pre>
-
-<h3 id="Examples_4">Examples</h3>
-
-<pre class="brush: js">2 * 2 // 4
--2 * 2 // -4
-Infinity * 0 // NaN
-Infinity * Infinity // Infinity
-'foo' * 2 // NaN
-</pre>
-
-<h2 id="Remainder_()"><a id="餘數運算" name="餘數運算">Remainder (%)</a></h2>
-
-<p>The remainder operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend.</p>
-
-<h3 id="Syntax_5">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> var1 % var2
-</pre>
-
-<h3 id="Examples_5">Examples</h3>
-
-<pre class="brush: js">12 % 5 // 2
--1 % 2 // -1
-1 % -2 // 1
-NaN % 2 // NaN
-1 % 2 // 1
-2 % 3 // 2
--4 % 2 // -0
-5.5 % 2 // 1.5
-</pre>
-
-<h2 id="Exponentiation_(**)"><a id="指數運算" name="指數運算">Exponentiation (**)</a></h2>
-
-<p>The exponentiation operator returns the result of raising first operand to the power second operand. that is, <code>var1</code><sup><code>var2</code></sup>, in the preceding statement, where <code>var1</code> and <code>var2</code> are variables. Exponentiation operator is right associative. <code>a ** b ** c</code> is equal to <code>a ** (b ** c)</code>.</p>
-
-<h3 id="Syntax_6">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> var1 ** var2
-</pre>
-
-<h3 id="Notes">Notes</h3>
-
-<p>In most languages like PHP and Python and others that have an exponentiation operator (**), the exponentiation operator is defined to have a higher precedence than unary operators such as unary + and unary -, but there are a few exceptions. For example, in Bash the ** operator is defined to have a lower precedence than unary operators. In JavaScript, it is impossible to write an ambiguous exponentiation expression, i.e. you cannot put a unary operator (<code>+/-/~/!/delete/void/typeof</code>) immediately before the base number.</p>
-
-<pre class="brush: js">-2 ** 2;
-// 4 in Bash, -4 in other languages.
-// This is invalid in JavaScript, as the operation is ambiguous.
-
-
--(2 ** 2);
-// -4 in JavaScript and the author's intention is unambiguous.
-</pre>
-
-<h3 id="Examples_6">Examples</h3>
-
-<pre class="brush: js">2 ** 3 // 8
-3 ** 2 // 9
-3 ** 2.5 // 15.588457268119896
-10 ** -1 // 0.1
-NaN ** 2 // NaN
-
-2 ** 3 ** 2 // 512
-2 ** (3 ** 2) // 512
-(2 ** 3) ** 2 // 64
-</pre>
-
-<p>To invert the sign of the result of an exponentiation expression:</p>
-
-<pre class="brush: js">-(2 ** 2) // -4
-</pre>
-
-<p>To force the base of an exponentiation expression to be a negative number:</p>
-
-<pre class="brush: js">(-2) ** 2 // 4
-</pre>
-
-<div class="note">
-<p><strong>Note:</strong> JavaScript also has <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Bitwise_XOR">a bitwise operator ^ (logical XOR)</a>. <code>**</code> and <code>^</code> are different (for example : <code>2 ** 3 === 8</code> when <code>2 ^ 3 === 1</code>.)</p>
-</div>
-
-<h2 id="Increment_()"><a id="遞增運算" name="遞增運算">Increment (++)</a></h2>
-
-<p>The increment operator increments (adds one to) its operand and returns a value.</p>
-
-<ul>
- <li>If used postfix, with operator after operand (for example, x++), then it returns the value before incrementing.</li>
- <li>If used prefix with operator before operand (for example, ++x), then it returns the value after incrementing.</li>
-</ul>
-
-<h3 id="Syntax_7">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x++ or ++x
-</pre>
-
-<h3 id="Examples_7">Examples</h3>
-
-<pre class="brush: js">// Postfix
-var x = 3;
-y = x++; // y = 3, x = 4
-
-// Prefix
-var a = 2;
-b = ++a; // a = 3, b = 3
-</pre>
-
-<h2 id="Decrement_(--)"><a id="遞減運算" name="遞減運算">Decrement (--)</a></h2>
-
-<p>The decrement operator decrements (subtracts one from) its operand and returns a value.</p>
-
-<ul>
- <li>If used postfix (for example, x--), then it returns the value before decrementing.</li>
- <li>If used prefix (for example, --x), then it returns the value after decrementing.</li>
-</ul>
-
-<h3 id="Syntax_8">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> x-- or --x
-</pre>
-
-<h3 id="Examples_8">Examples</h3>
-
-<pre class="brush: js">// Postfix
-var x = 3;
-y = x--; // y = 3, x = 2
-
-// Prefix
-var a = 2;
-b = --a; // a = 1, b = 1
-</pre>
-
-<h2 id="Unary_negation_(-)"><a name="Unary_negation">Unary negation (-)</a></h2>
-
-<p>The unary negation operator precedes its operand and negates it.</p>
-
-<h3 id="Syntax_9">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> -x
-</pre>
-
-<h3 id="Examples_9">Examples</h3>
-
-<pre class="brush: js">var x = 3;
-y = -x; // y = -3, x = 3
-
-// Unary negation operator can convert non-numbers into a number
-var x = "4";
-y = -x; // y = -4
-</pre>
-
-<h2 id="Unary_plus_()"><a name="Unary_plus">Unary plus</a> (+)</h2>
-
-<p>The unary plus operator precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't already. Although unary negation (-) also can convert non-numbers, unary plus is the fastest and preferred way of converting something into a number, because it does not perform any other operations on the number. It can convert string representations of integers and floats, as well as the non-string values <code>true</code>, <code>false</code>, and <code>null</code>. Integers in both decimal and hexadecimal ("0x"-prefixed) formats are supported. Negative numbers are supported (though not for hex). If it cannot parse a particular value, it will evaluate to {{jsxref("NaN")}}.</p>
-
-<h3 id="Syntax_10">Syntax</h3>
-
-<pre class="syntaxbox"><strong>Operator:</strong> +x
-</pre>
-
-<h3 id="Examples_10">Examples</h3>
-
-<pre class="brush: js">+3 // 3
-+'3' // 3
-+true // 1
-+false // 0
-+null // 0
-+function(val){ return val } // NaN
-</pre>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-11.3')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.6">Additive operators</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.5">Multiplicative operators</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.3">Postfix expressions</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.4">Unary operators</a>.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES2015', '#sec-postfix-expressions')}}</td>
- <td>{{Spec2('ES2015')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-additive-operators">Additive operators</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-multiplicative-operators">Multiplicative operators</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-postfix-expressions">Postfix expressions</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-unary-operators">Unary operators</a>.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES2016', '#sec-postfix-expressions')}}</td>
- <td>{{Spec2('ES2016')}}</td>
- <td>Added <a href="https://github.com/rwaldron/exponentiation-operator">Exponentiation operator</a>.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES2017', '#sec-postfix-expressions')}}</td>
- <td>{{Spec2('ES2017')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-additive-operators')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-
-
-<p>{{Compat("javascript.operators.arithmetic")}}</p>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators">Assignment operators</a></li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/operators/bitwise_operators/index.html b/files/zh-tw/web/javascript/reference/operators/bitwise_operators/index.html
deleted file mode 100644
index 86f78270b5..0000000000
--- a/files/zh-tw/web/javascript/reference/operators/bitwise_operators/index.html
+++ /dev/null
@@ -1,555 +0,0 @@
----
-title: 位元運算子
-slug: Web/JavaScript/Reference/Operators/Bitwise_Operators
-translation_of: Web/JavaScript/Reference/Operators
-translation_of_original: Web/JavaScript/Reference/Operators/Bitwise_Operators
----
-<div>{{jsSidebar("Operators")}}</div>
-
-<p><strong>位元運算子</strong>將運算元視為一段 32 位元長的 0 和 1 序列,而不是十進位、十六進位或八進位的 <code><a href="/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Numbers</a></code>。 舉例來說,十進位的 9 可以用二進位表示為 1001。位元運算子對這樣的二進位表示法進行運算,然後回傳標準 JavaScript 數值。</p>
-
-<div>{{EmbedInteractiveExample("pages/js/expressions-bitwiseoperators.html")}}</div>
-
-
-
-<p>下表總結了 JavaScript 的位元運算子:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th>Operator</th>
- <th>Usage</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#(位元_AND)">位元 AND</a></td>
- <td><code>a &amp; b</code></td>
- <td>當兩運算元的該位置皆為 <code>1</code> 時,回傳值的該位置為 <code>1</code>。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#(位元_OR)">位元 OR</a></td>
- <td><code>a | b</code></td>
- <td>當兩運算元的該位置有一者為 <code>1</code> 時,回傳值的該位置為 <code>1</code>。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#(位元_XOR)">位元 XOR</a></td>
- <td><code>a ^ b</code></td>
- <td>當兩運算元的該位置恰好一者為 <code>1</code> 時,回傳值的該位置為 <code>1</code>。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#(位元_NOT)">位元 NOT</a></td>
- <td><code>~ a</code></td>
- <td>將運算元的所有位元反轉。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#%3C%3C_(左移)">左移</a></td>
- <td><code>a &lt;&lt; b</code></td>
- <td>將 <code>a</code> 的二進位表示法左移 <code>b</code> (&lt; 32) 位元,右側補 <code>0</code>。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#%3E%3E_(保持符號右移)">保持符號右移</a></td>
- <td><code>a &gt;&gt; b</code></td>
- <td>將 <code>a</code> 的二進位表示法右移 <code>b</code> (&lt; 32) 位元,拋棄被移出的位元。</td>
- </tr>
- <tr>
- <td><a href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#%3E%3E%3E_(填零右移)">填零右移</a></td>
- <td><code>a &gt;&gt;&gt; b</code>  </td>
- <td>將 <code>a</code> 的二進位表示法右移 <code>b</code> (&lt; 32) 位元,拋棄被移出的位元,並於右側補 <code>0</code>。</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="帶號的_32位元整數">帶號的 32位元整數</h2>
-
-<p>所有位元運算子的運算元皆會被轉換成二<a href="https://en.wikipedia.org/wiki/Method_of_complements">補數系統</a>下的帶號32位元整數。二補數系統意味著一個整數的加法反元素(例如 5和 -5)是該整數的所有位元反轉(位元 NOT,也就是該數的一補數) 再加一。舉例來說,下面的序列代表著整數 314:</p>
-
-<pre class="brush: js">00000000000000000000000100111010
-</pre>
-
-<p>下面的序列代表 <code>~314</code>,也就是 <code>314</code> 的一補數:</p>
-
-<pre class="brush: js">11111111111111111111111011000101
-</pre>
-
-<p>接著,下面代表著 <code>-314</code>,也就是 <code>314</code> 的二補數:</p>
-
-<pre class="brush: js">11111111111111111111111011000110
-</pre>
-
-<p>二補數系統確保了正值時最左邊的位元為 0,反之則為 1。因此,最左邊的位元被稱作符號位。</p>
-
-<p>整數 <code>0</code> 全由位元 0組成。</p>
-
-<pre class="brush: js">0 (base 10) = 00000000000000000000000000000000 (base 2)
-</pre>
-
-<p>整數 <code>-1</code> 全由位元 1組成。</p>
-
-<pre class="brush: js">-1 (base 10) = 11111111111111111111111111111111 (base 2)
-</pre>
-
-<p>整數 <code>-2147483648</code> (十六進位: <code>-0x80000000</code>) 除了第一位為 1,其餘皆由位元 0組成。</p>
-
-<pre class="brush: js">-2147483648 (base 10) = 10000000000000000000000000000000 (base 2)
-</pre>
-
-<p>整數 <code>-2147483648</code> (十六進位: <code>-0x7fffffff</code>) 除了第一位為 0,其餘皆由位元 1組成。</p>
-
-<pre class="brush: js">2147483647 (base 10) = 01111111111111111111111111111111 (base 2)
-</pre>
-
-<p>整數 <code>-2147483648</code> 和 <code>2147483647</code> 分別為帶號32位元整數所能表示的最小值和最大值。</p>
-
-<h2 id="位元邏輯運算子">位元邏輯運算子</h2>
-
-<p>大致上,位元邏輯運算子的運作如下︰</p>
-
-<ul>
- <li>運算元會被轉換成 32位元的整數,並被表達為一系列的位元 (0 和 1)。多於 32位元的數值在轉換中其超出第32位元的部分會被捨棄。下面的多於32位元整數在被轉換時:
- <pre class="brush: js">Before: 11100110111110100000000000000110000000000001
-After: 10100000000000000110000000000001</pre>
- </li>
- <li>兩個運算元中的位元會根據其位置兩兩一組:第一個跟第一個、第二個跟第二個 ...</li>
- <li>運算子會作用在每一組位元上,運算完成後再重新組合起來得到回傳值。</li>
-</ul>
-
-<h3 id="(位元_AND)"><a id="Bitwise_AND" name="Bitwise_AND">&amp; (位元 AND)</a></h3>
-
-<p>對每一組位元執行 AND 運算。<code>a</code> AND <code>b</code> 只在 <code>a</code> 和 <code>b</code> 同時為 <code>1</code> 時得到 1。AND運算的真值表如下:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">a</td>
- <td class="header">b</td>
- <td class="header">a AND b</td>
- </tr>
- <tr>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>0</td>
- <td>1</td>
- <td>0</td>
- </tr>
- <tr>
- <td>1</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>1</td>
- <td>1</td>
- <td>1</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: js">. 9 (base 10) = 00000000000000000000000000001001 (base 2)
- 14 (base 10) = 00000000000000000000000000001110 (base 2)
- --------------------------------
-14 &amp; 9 (base 10) = 00000000000000000000000000001000 (base 2) = 8 (base 10)
-</pre>
-
-<p>將任何數 <code>x</code> 和 <code>0</code> 做位元 AND 皆會得到 <code>0</code>。將任何數 <code>x</code> 和 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">-1</span></font> 做位元 AND 皆會得到 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">x</span></font>。</p>
-
-<h3 id="(位元_OR)"><a name="Bitwise_OR">| (位元 OR)</a></h3>
-
-<p>對每一組位元執行 OR 運算。<code>a</code> OR <code>b</code> 在 <code>a</code> 和 <code>b</code> 有一者為 <code>1</code> 時得到 1。OR運算的真值表如下:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">a</td>
- <td class="header">b</td>
- <td class="header">a OR b</td>
- </tr>
- <tr>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>0</td>
- <td>1</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>0</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>1</td>
- <td>1</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: js">. 9 (base 10) = 00000000000000000000000000001001 (base 2)
- 14 (base 10) = 00000000000000000000000000001110 (base 2)
- --------------------------------
-14 | 9 (base 10) = 00000000000000000000000000001111 (base 2) = 15 (base 10)
-</pre>
-
-<p>將任何數 <code>x</code> 和 <code>0</code> 做位元 OR 皆會得到 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">x</span></font>。將任何數 <code>x</code> 和 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">-1</span></font> 做位元 OR 皆會得到 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">-1</span></font>。</p>
-
-<h3 id="(位元_XOR)"><a name="Bitwise_XOR">^ (位元 XOR)</a></h3>
-
-<p>對每一組位元執行 XOR 運算。<code>a</code> XOR <code>b</code> 只在 <code>a</code> 和 <code>b</code> 恰一者為 <code>1</code> 時得到 1。XOR運算的真值表如下:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">a</td>
- <td class="header">b</td>
- <td class="header">a XOR b</td>
- </tr>
- <tr>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>0</td>
- <td>1</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>0</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>1</td>
- <td>0</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: js">. 9 (base 10) = 00000000000000000000000000001001 (base 2)
- 14 (base 10) = 00000000000000000000000000001110 (base 2)
- --------------------------------
-14 ^ 9 (base 10) = 00000000000000000000000000000111 (base 2) = 7 (base 10)
-</pre>
-
-<p>將任何數 <code>x</code> 和 <code>0</code> 做位元 AND 皆會得到 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">x</span></font>。將任何數 <code>x</code> 和 <font face="consolas, Liberation Mono, courier, monospace">-1</font> 做位元 AND 皆會得到 <code>~x</code>。</p>
-
-<h3 id="(位元_NOT)"><a name="Bitwise_NOT">~ (位元 NOT)</a></h3>
-
-<p>對每一個位元執行 NOT 運算。NOT <code>a</code> 會得到 <code>a</code> 的反轉值(也就是一補數)。NOT運算的真值表如下:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">a</td>
- <td class="header">NOT a</td>
- </tr>
- <tr>
- <td>0</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>0</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: js"> 9 (base 10) = 00000000000000000000000000001001 (base 2)
- --------------------------------
-~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10)
-</pre>
-
-<p>將任何數 <code>x</code> 做位元 NOT 皆會得到 <code>-(x + 1)</code>。舉例來說,<code>~-5</code> 會得到 <code>4</code>。</p>
-
-<p>值得注意的是,因為使用 32位元表示法表示數值 <code>~-1</code> 和 <code>~4294967295</code> (2<sup>32</sup>-1) 皆會得到 <code>0</code>。</p>
-
-<h2 id="位元位移運算子">位元位移運算子</h2>
-
-<p>位移運算子需要兩個運算元:第一個是要被位移的值,第二個是位元位移量。位移的方向取決於使用的運算子。</p>
-
-<p>位移運算子將運算元轉換成 32位元的大端序整數並回傳一個與左運算元相同類別的值。右運算元應不大於32,如果超過的話,將只會使用後 5個位元。</p>
-
-<h3 id="&lt;&lt;_(左移)"><a name="Left_shift">&lt;&lt; (左移)</a></h3>
-
-<p>將第一個運算元向左位移指定的量。被移出的位元會被拋棄,並從右側補零。</p>
-
-<p>例如,<code>9 &lt;&lt; 2</code> 會得到 36:</p>
-
-<pre class="brush: js">. 9 (base 10): 00000000000000000000000000001001 (base 2)
- --------------------------------
-9 &lt;&lt; 2 (base 10): 00000000000000000000000000100100 (base 2) = 36 (base 10)
-</pre>
-
-<p>將任意值 <code>x</code> 左移 <code>y</code> 位元會得到 <code>x * 2 ** y</code>。</p>
-
-<h3 id=">>_(保持符號右移)"><a name="Right_shift">&gt;&gt; (保持符號右移)</a></h3>
-
-<p>將第一個運算元向右位移指定的量。被移出的位元會被拋棄,並從左側補進和原本最左端相同的位元值。因為新的最左端位元和原本的最左端位元是一樣的,符號位(最左端位元)並不會改變。「保持符號」之名便是因此。</p>
-
-<p>例如,<code>9 &gt;&gt; 2</code> 會得到 2:</p>
-
-<pre class="brush: js">. 9 (base 10): 00000000000000000000000000001001 (base 2)
- --------------------------------
-9 &gt;&gt; 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10)
-</pre>
-
-<p>同樣地,<code>-9 &gt;&gt; 2</code> 會得到 <code>-3</code>,因為符號會保持不變。</p>
-
-<pre class="brush: js">. -9 (base 10): 11111111111111111111111111110111 (base 2)
- --------------------------------
--9 &gt;&gt; 2 (base 10): 11111111111111111111111111111101 (base 2) = -3 (base 10)
-</pre>
-
-<h3 id=">>>_(填零右移)"><a name="Unsigned_right_shift">&gt;&gt;&gt; (填零右移)</a></h3>
-
-<p>將第一個運算元向右位移指定的量。被移出的位元會被拋棄,並從左側補零。因為符號位變成 0,所以結果永遠都是正值。</p>
-
-<p>對非負的數來說,填零右移會得到和保持符號右移一樣的結果。例如,<code>9 &gt;&gt;&gt; 2</code> 和 <code>9 &gt;&gt; 2</code> 一樣,皆會得到 2:</p>
-
-<pre class="brush: js">. 9 (base 10): 00000000000000000000000000001001 (base 2)
- --------------------------------
-9 &gt;&gt;&gt; 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10)
-</pre>
-
-<p>然而對負值來說並不是這麼一回事。例如,<code>-9 &gt;&gt;&gt; 2</code> 會得到 1073741821,跟 <code>-9 &gt;&gt; 2</code> (得到 <code>-3</code>)的結果是不一樣的:</p>
-
-<pre class="brush: js">. -9 (base 10): 11111111111111111111111111110111 (base 2)
- --------------------------------
--9 &gt;&gt;&gt; 2 (base 10): 00111111111111111111111111111101 (base 2) = 1073741821 (base 10)
-</pre>
-
-<h2 id="範例">範例</h2>
-
-<h3 id="旗標(flags)_和遮罩_(bitmasks)">旗標(flags) 和遮罩 (bitmasks)</h3>
-
-<p>位元運算子常被用於生成、修改、和讀取旗標序列,就像是二進制的變數一般。雖然也可以使用普通變數,但使用二進制的旗標序列大大的減少了所需空間 (32 倍)。</p>
-
-<p>假設有 4個旗標:</p>
-
-<ul>
- <li>旗標 A:我們有螞蟻問題</li>
- <li>旗標 B:我們擁有一隻蝙蝠</li>
- <li>旗標 C:我們擁有一隻貓</li>
- <li>旗標 D:我們擁有一隻鴨子</li>
-</ul>
-
-<p>這些旗標倍表達成一個位元序列:DCBA。當一個旗標被立起 (set)時,其值為1。當一個旗標被放下 (clear),其值為0。假設有一變數 <code>flags</code> 的二進位值為 0101:</p>
-
-<pre class="brush: js">var flags = 5; // 二進位 0101
-</pre>
-
-<p>這個值表示:</p>
-
-<ul>
- <li>旗標 A為真 (我們有螞蟻問題);</li>
- <li>旗標 B為假 (我們並未擁有一隻蝙蝠);</li>
- <li>旗標 C為真 (我們擁有一隻貓);</li>
- <li>旗標 D為假 (我們並未擁有一隻鴨子);</li>
-</ul>
-
-<p>因為位元運算子進行的是 32位元操作,0101 實際上是 00000000000000000000000000000101,但前導的 0可被忽略因為他們沒有實際上的意義。</p>
-
-<p>位元遮罩則為一個可以修改且(或)讀取旗標序列的位元序列。通常為每個單獨旗標為真的「初始」值:</p>
-
-<pre class="brush: js">var FLAG_A = 1; // 0001
-var FLAG_B = 2; // 0010
-var FLAG_C = 4; // 0100
-var FLAG_D = 8; // 1000
-</pre>
-
-<p>新的位元遮罩可以透過對初始遮罩進行位元運算獲得。例如,遮罩 1011 可以透過對 FLAG_A、FLAG_B、和 FLAG_D進行 OR運算獲得:</p>
-
-<pre class="brush: js">var mask = FLAG_A | FLAG_B | FLAG_D; // 0001 | 0010 | 1000 =&gt; 1011
-</pre>
-
-<p>Individual flag values can be extracted by ANDing them with a bitmask, where each bit with the value of one will "extract" the corresponding flag. The bitmask <em>masks</em> out the non-relevant flags by ANDing with zeroes (hence the term "bitmask"). For example, the bitmask 0100 can be used to see if flag C is set:</p>
-
-<pre class="brush: js">// if we own a cat
-if (flags &amp; FLAG_C) { // 0101 &amp; 0100 =&gt; 0100 =&gt; true
- // do stuff
-}
-</pre>
-
-<p>A bitmask with multiple set flags acts like an "either/or". For example, the following two are equivalent:</p>
-
-<pre class="brush: js">// if we own a bat or we own a cat
-// (0101 &amp; 0010) || (0101 &amp; 0100) =&gt; 0000 || 0100 =&gt; true
-if ((flags &amp; FLAG_B) || (flags &amp; FLAG_C)) {
- // do stuff
-}
-</pre>
-
-<pre class="brush: js">// if we own a bat or cat
-var mask = FLAG_B | FLAG_C; // 0010 | 0100 =&gt; 0110
-if (flags &amp; mask) { // 0101 &amp; 0110 =&gt; 0100 =&gt; true
- // do stuff
-}
-</pre>
-
-<p>Flags can be set by ORing them with a bitmask, where each bit with the value one will set the corresponding flag, if that flag isn't already set. For example, the bitmask 1100 can be used to set flags C and D:</p>
-
-<pre class="brush: js">// yes, we own a cat and a duck
-var mask = FLAG_C | FLAG_D; // 0100 | 1000 =&gt; 1100
-flags |= mask; // 0101 | 1100 =&gt; 1101
-</pre>
-
-<p>Flags can be cleared by ANDing them with a bitmask, where each bit with the value zero will clear the corresponding flag, if it isn't already cleared. This bitmask can be created by NOTing primitive bitmasks. For example, the bitmask 1010 can be used to clear flags A and C:</p>
-
-<pre class="brush: js">// no, we don't have an ant problem or own a cat
-var mask = ~(FLAG_A | FLAG_C); // ~0101 =&gt; 1010
-flags &amp;= mask; // 1101 &amp; 1010 =&gt; 1000
-</pre>
-
-<p>The mask could also have been created with <code>~FLAG_A &amp; ~FLAG_C</code> (De Morgan's law):</p>
-
-<pre class="brush: js">// no, we don't have an ant problem, and we don't own a cat
-var mask = ~FLAG_A &amp; ~FLAG_C;
-flags &amp;= mask; // 1101 &amp; 1010 =&gt; 1000
-</pre>
-
-<p>Flags can be toggled by XORing them with a bitmask, where each bit with the value one will toggle the corresponding flag. For example, the bitmask 0110 can be used to toggle flags B and C:</p>
-
-<pre class="brush: js">// if we didn't have a bat, we have one now,
-// and if we did have one, bye-bye bat
-// same thing for cats
-var mask = FLAG_B | FLAG_C;
-flags = flags ^ mask; // 1100 ^ 0110 =&gt; 1010
-</pre>
-
-<p>Finally, the flags can all be flipped with the NOT operator:</p>
-
-<pre class="brush: js">// entering parallel universe...
-flags = ~flags; // ~1010 =&gt; 0101
-</pre>
-
-<h3 id="Conversion_snippets">Conversion snippets</h3>
-
-<p>Convert a binary <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code> to a decimal <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code>:</p>
-
-<pre class="brush: js">var sBinString = '1011';
-var nMyNumber = parseInt(sBinString, 2);
-alert(nMyNumber); // prints 11, i.e. 1011
-</pre>
-
-<p>Convert a decimal <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code> to a binary <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code>:</p>
-
-<pre class="brush: js">var nMyNumber = 11;
-var sBinString = nMyNumber.toString(2);
-alert(sBinString); // prints 1011, i.e. 11
-</pre>
-
-<h3 id="Automate_Mask_Creation">Automate Mask Creation</h3>
-
-<p>You can create multiple masks from a set of <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code> values, like this:</p>
-
-<pre class="brush: js">function createMask() {
- var nMask = 0, nFlag = 0, nLen = arguments.length &gt; 32 ? 32 : arguments.length;
- for (nFlag; nFlag &lt; nLen; nMask |= arguments[nFlag] &lt;&lt; nFlag++);
- return nMask;
-}
-var mask1 = createMask(true, true, false, true); // 11, i.e.: 1011
-var mask2 = createMask(false, false, true); // 4, i.e.: 0100
-var mask3 = createMask(true); // 1, i.e.: 0001
-// etc.
-
-alert(mask1); // prints 11, i.e.: 1011
-</pre>
-
-<h3 id="Reverse_algorithm_an_array_of_booleans_from_a_mask">Reverse algorithm: an array of booleans from a mask</h3>
-
-<p>If you want to create an <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> of <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Booleans</a></code> from a mask you can use this code:</p>
-
-<pre class="brush: js">function arrayFromMask(nMask) {
- // nMask must be between -2147483648 and 2147483647
- if (nMask &gt; 0x7fffffff || nMask &lt; -0x80000000) {
- throw new TypeError('arrayFromMask - out of range');
- }
- for (var nShifted = nMask, aFromMask = []; nShifted;
- aFromMask.push(Boolean(nShifted &amp; 1)), nShifted &gt;&gt;&gt;= 1);
- return aFromMask;
-}
-
-var array1 = arrayFromMask(11);
-var array2 = arrayFromMask(4);
-var array3 = arrayFromMask(1);
-
-alert('[' + array1.join(', ') + ']');
-// prints "[true, true, false, true]", i.e.: 11, i.e.: 1011
-</pre>
-
-<p>You can test both algorithms at the same time…</p>
-
-<pre class="brush: js">var nTest = 19; // our custom mask
-var nResult = createMask.apply(this, arrayFromMask(nTest));
-
-alert(nResult); // 19
-</pre>
-
-<p>For the didactic purpose only (since there is the <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number/toString">Number.toString(2)</a></code> method), we show how it is possible to modify the <code>arrayFromMask</code> algorithm in order to create a <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/JavaScript/Reference/Global_Objects/String">String</a></code> containing the binary representation of a <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number">Number</a></code>, rather than an <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> of <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="/en-US/docs/JavaScript/Reference/Global_Objects/Boolean">Booleans</a></code>:</p>
-
-<pre class="brush: js">function createBinaryString(nMask) {
- // nMask must be between -2147483648 and 2147483647
- for (var nFlag = 0, nShifted = nMask, sMask = ''; nFlag &lt; 32;
- nFlag++, sMask += String(nShifted &gt;&gt;&gt; 31), nShifted &lt;&lt;= 1);
- return sMask;
-}
-
-var string1 = createBinaryString(11);
-var string2 = createBinaryString(4);
-var string3 = createBinaryString(1);
-
-alert(string1);
-// prints 00000000000000000000000000001011, i.e. 11
-</pre>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-11.7')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.4.8">Bitwise NOT operator</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.7">Bitwise shift operators</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.10">Binary bitwise operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-bitwise-shift-operators')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-bitwise-not-operator">Bitwise NOT operator</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-bitwise-shift-operators">Bitwise shift operators</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-binary-bitwise-operators">Binary bitwise operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-bitwise-shift-operators')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td>Defined in several sections of the specification: <a href="http://tc39.github.io/ecma262/#sec-bitwise-not-operator">Bitwise NOT operator</a>, <a href="http://tc39.github.io/ecma262/#sec-bitwise-shift-operators">Bitwise shift operators</a>, <a href="http://tc39.github.io/ecma262/#sec-binary-bitwise-operators">Binary bitwise operators</a></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<div class="hidden">
-<p>The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-</div>
-
-<p>{{Compat("javascript.operators.bitwise")}}</p>
-
-<h2 id="另見">另見</h2>
-
-<ul>
- <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators">Logical operators</a></li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/operators/comparison_operators/index.html b/files/zh-tw/web/javascript/reference/operators/comparison_operators/index.html
deleted file mode 100644
index f0b3e39c6e..0000000000
--- a/files/zh-tw/web/javascript/reference/operators/comparison_operators/index.html
+++ /dev/null
@@ -1,284 +0,0 @@
----
-title: 比較運算子
-slug: Web/JavaScript/Reference/Operators/Comparison_Operators
-translation_of: Web/JavaScript/Reference/Operators
-translation_of_original: Web/JavaScript/Reference/Operators/Comparison_Operators
----
-<div>{{jsSidebar("Operators")}}</div>
-
-<p>JavaScript has both strict and type–converting comparisons. A strict comparison (e.g., <code>===</code>) is only true if the operands are of the same type and the contents match. The more commonly-used abstract comparison (e.g. <code>==</code>) converts the operands to the same type before making the comparison. For relational abstract comparisons (e.g., <code>&lt;=</code>), the operands are first converted to primitives, then to the same type, before comparison.</p>
-
-<p>Strings are compared based on standard lexicographical ordering, using Unicode values.</p>
-
-<p>Features of comparisons:</p>
-
-<ul>
- <li>Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.</li>
- <li>Two numbers are strictly equal when they are numerically equal (have the same number value). <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN" title="NaN">NaN</a> is not equal to anything, including NaN. Positive and negative zeros are equal to one another.</li>
- <li>Two Boolean operands are strictly equal if both are <code>true</code> or both are <code>false</code>.</li>
- <li>Two distinct objects are never equal for either strict or abstract comparisons.</li>
- <li>An expression comparing Objects is only true if the operands reference the same Object.</li>
- <li>Null and Undefined Types are strictly equal to themselves and abstractly equal to each other.</li>
-</ul>
-
-<h2 id="Equality_operators">Equality operators</h2>
-
-<h3 id="Equality_()"><a name="Equality">Equality (==)</a></h3>
-
-<p>The equality operator converts the operands if they are <strong>not of the same type</strong>, then applies strict comparison. If <strong>both operands are objects</strong>, then JavaScript compares internal references which are equal when operands refer to the same object in memory.</p>
-
-<h4 id="Syntax">Syntax</h4>
-
-<pre class="syntaxbox">x == y
-</pre>
-
-<h4 id="Examples">Examples</h4>
-
-<pre class="brush: js"> 1 == 1 // true
- "1" == 1 // true
- 1 == '1' // true
- 0 == false // true
- 0 == null // false
-var object1 = {"value":"key"}, object2={"value":"key"};
-object1 == object2 //false
-
- 0 == undefined // false
-null == undefined // true
-</pre>
-
-<h3 id="Inequality_(!)"><a name="Inequality">Inequality (!=)</a></h3>
-
-<p>The inequality operator returns true if the operands are not equal. If the two operands are <strong>not of the same type</strong>, JavaScript attempts to convert the operands to an appropriate type for the comparison. If <strong>both operands are objects</strong>, then JavaScript compares internal references which are not equal when operands refer to different objects in memory.</p>
-
-<h4 id="Syntax_2">Syntax</h4>
-
-<pre class="syntaxbox">x != y</pre>
-
-<h4 id="Examples_2">Examples</h4>
-
-<pre class="brush: js">1 != 2 // true
-1 != "1" // false
-1 != '1' // false
-1 != true // false
-0 != false // false
-</pre>
-
-<h3 id="Identity_strict_equality_()"><a name="Identity">Identity / strict equality (===)</a></h3>
-
-<p>The identity operator returns true if the operands are strictly equal (see above) <strong>with no type conversion</strong>. </p>
-
-<h4 id="Syntax_3">Syntax</h4>
-
-<pre class="syntaxbox">x === y</pre>
-
-<h4 id="Examples_3">Examples</h4>
-
-<pre class="brush: js ">3 === 3 // true
-3 === '3' // false
-var object1 = {"value":"key"}, object2={"value":"key"};
-object1 === object2 //false</pre>
-
-<p> </p>
-
-<h3 id="Non-identity_strict_inequality_(!)"><a name="Nonidentity">Non-identity / strict inequality (!==)</a></h3>
-
-<p>The non-identity operator returns true if the operands <strong>are not equal and/or not of the same type</strong>.</p>
-
-<h4 id="Syntax_4">Syntax</h4>
-
-<pre class="syntaxbox">x !== y</pre>
-
-<h4 id="Examples_4">Examples</h4>
-
-<pre class="brush: js">3 !== '3' // true
-4 !== 3 // true
-</pre>
-
-<h2 id="Relational_operators">Relational operators</h2>
-
-<p>Each of these operators will call the <code>valueOf()</code> function on each operand before a comparison is made.</p>
-
-<h3 id="Greater_than_operator_(>)"><a name="Greater_than_operator">Greater than operator (&gt;)</a></h3>
-
-<p>The greater than operator returns true if the left operand is greater than the right operand.</p>
-
-<h4 id="Syntax_5">Syntax</h4>
-
-<pre class="syntaxbox">x &gt; y</pre>
-
-<h4 id="Examples_5">Examples</h4>
-
-<pre class="brush: js">4 &gt; 3 // true
-</pre>
-
-<h3 id="Greater_than_or_equal_operator_(>)"><a name="Greater_than_or_equal_operator">Greater than or equal operator (&gt;=)</a></h3>
-
-<p>The greater than or equal operator returns true if the left operand is greater than or equal to the right operand.</p>
-
-<h4 id="Syntax_6">Syntax</h4>
-
-<pre class="syntaxbox"> x &gt;= y</pre>
-
-<h4 id="Examples_6">Examples</h4>
-
-<pre class="brush: js">4 &gt;= 3 // true
-3 &gt;= 3 // true
-</pre>
-
-<h3 id="Less_than_operator_(&lt;)"><a name="Less_than_operator">Less than operator (&lt;)</a></h3>
-
-<p>The less than operator returns true if the left operand is less than the right operand.</p>
-
-<h4 id="Syntax_7">Syntax</h4>
-
-<pre class="syntaxbox"> x &lt; y</pre>
-
-<h4 id="Examples_7">Examples</h4>
-
-<pre class="brush: js">3 &lt; 4 // true
-</pre>
-
-<h3 id="Less_than_or_equal_operator_(&lt;)"><a id="Less_than_or_equal_operator" name="Less_than_or_equal_operator">Less than or equal operator (&lt;=)</a></h3>
-
-<p>The less than or equal operator returns true if the left operand is less than or equal to the right operand.</p>
-
-<h4 id="Syntax_8">Syntax</h4>
-
-<pre class="syntaxbox"> x &lt;= y</pre>
-
-<h4 id="Examples_8">Examples</h4>
-
-<pre class="brush: js">3 &lt;= 4 // true
-</pre>
-
-<h2 id="Using_the_Equality_Operators">Using the Equality Operators</h2>
-
-<p>The standard equality operators (<code>==</code> and <code>!=</code>) use the <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3">Abstract Equality Comparison Algorithm</a> to compare two operands. If the operands are of different types, it will attempt to convert them to the same type before making the comparison, e.g., in the expression <code>5 == '5'</code>, the string on the right is converted to {{jsxref("Number")}} before the comparison is made.</p>
-
-<p>The strict equality operators (<code>===</code> and <code>!==</code>) use the <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.6">Strict Equality Comparison Algorithm</a> and are intended for performing equality comparisons on operands of the same type. If the operands are of different types, the result is always <code>false</code> so <code>5 !== '5'</code>.</p>
-
-<p>Use strict equality operators if the operands must be of a specific type as well as value or if the exact type of the operands is important. Otherwise, use the standard equality operators, which allow you to compare the identity of two operands even if they are not of the same type.</p>
-
-<p>When type conversion is involved in the comparison (i.e., non–strict comparison), JavaScript converts the types {{jsxref("String")}}, {{jsxref("Number")}}, {{jsxref("Boolean")}}, or {{jsxref("Object")}} operands as follows:</p>
-
-<ul>
- <li>When comparing a number and a string, the string is converted to a number value. JavaScript attempts to convert the string numeric literal to a <code>Number</code> type value. First, a mathematical value is derived from the string numeric literal. Next, this value is rounded to nearest <code>Number</code> type value.</li>
- <li>If one of the operands is <code>Boolean</code>, the Boolean operand is converted to 1 if it is <code>true</code> and +0 if it is <code>false</code>.</li>
- <li>If an object is compared with a number or string, JavaScript attempts to return the default value for the object. Operators attempt to convert the object to a primitive value, a <code>String</code> or <code>Number</code> value, using the <code>valueOf</code> and <code>toString</code> methods of the objects. If this attempt to convert the object fails, a runtime error is generated.</li>
- <li>Note that an object is converted into a primitive if, and only if, its comparand is a primitive. If both operands are objects, they're compared as objects, and the equality test is true only if both refer the same object.</li>
-</ul>
-
-<div class="note"><strong>Note:</strong> String objects are Type Object, not String! String objects are rarely used, so the following results might be surprising:</div>
-
-<pre class="brush:js">// true as both operands are type String (i.e. string primitives):
-'foo' === 'foo'
-
-var a = new String('foo');
-var b = new String('foo');
-
-// false as a and b are type Object and reference different objects
-a == b
-
-// false as a and b are type Object and reference different objects
-a === b
-
-// true as a and 'foo' are of different type and, the Object (a)
-// is converted to String 'foo' before comparison
-a == 'foo'</pre>
-
-<h2 id="規範">規範</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition. Implemented in JavaScript 1.0</td>
- </tr>
- <tr>
- <td>{{SpecName('ES3')}}</td>
- <td>{{Spec2('ES3')}}</td>
- <td>Adds <code>===</code> and <code>!==</code> operators. Implemented in JavaScript 1.3</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-11.8')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.8">Relational Operators</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.9">Equality Operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-relational-operators')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-relational-operators">Relational Operators</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-equality-operators">Equality Operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-relational-operators')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td>Defined in several sections of the specification: <a href="http://tc39.github.io/ecma262/#sec-relational-operators">Relational Operators</a>, <a href="http://tc39.github.io/ecma262/#sec-equality-operators">Equality Operators</a></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="參見">參見</h2>
-
-<ul>
- <li>{{jsxref("Object.is()")}}</li>
- <li>{{jsxref("Math.sign()")}}</li>
- <li><a href="/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness">Equality comparisons and sameness</a></li>
-</ul>
diff --git a/files/zh-tw/web/javascript/reference/operators/logical_operators/index.html b/files/zh-tw/web/javascript/reference/operators/logical_operators/index.html
deleted file mode 100644
index 2fb07f891e..0000000000
--- a/files/zh-tw/web/javascript/reference/operators/logical_operators/index.html
+++ /dev/null
@@ -1,244 +0,0 @@
----
-title: Logical operators
-slug: Web/JavaScript/Reference/Operators/Logical_Operators
-translation_of: Web/JavaScript/Reference/Operators
-translation_of_original: Web/JavaScript/Reference/Operators/Logical_Operators
----
-<div>{{jsSidebar("Operators")}}</div>
-
-<p>邏輯運算子通常會搭配 {{jsxref("Boolean")}} (logical) 值。若是,則回傳布林值。然而, <code>&amp;&amp;</code> 和 <code>||</code>  運算子通常回傳其中一運算元的值, 因此若這些運算子搭配非布林值使用,他們會回傳非布林值。</p>
-
-<div>{{EmbedInteractiveExample("pages/js/expressions-logicaloperator.html")}}</div>
-
-
-
-<h2 id="說明">說明</h2>
-
-<p>邏輯運算子的使用方式如下(<code><em>expr</em></code> 可能會是 <a href="/en-US/docs/Glossary/Data_structure">type</a>,不只是布林值):</p>
-
-<table class="fullwidth-table">
- <tbody>
- <tr>
- <th>Operator</th>
- <th>Syntax</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>邏輯 AND (<code>&amp;&amp;</code>)</td>
- <td><code><em>expr1</em> &amp;&amp; <em>expr2</em></code></td>
- <td>若 <code>expr<strong>1</strong></code> 可被轉換成 <code>true</code>, 回傳 <code>expr<strong>2</strong></code>; 否則 回傳 <code>expr<strong>1</strong></code>.</td>
- </tr>
- <tr>
- <td>邏輯 OR (<code>||</code>)</td>
- <td><code><em>expr1</em> || <em>expr2</em></code></td>
- <td>若 <code>expr<strong>1</strong></code> 可被轉換成 <code>true</code>, 回傳 <code>expr<strong>1</strong></code>; 否則 回傳 <code>expr<strong>2</strong></code>.</td>
- </tr>
- <tr>
- <td>邏輯 NOT (<code>!</code>)</td>
- <td><code>!<em>expr</em></code></td>
- <td>回傳 <code>false</code> 若它的單一運算元可被轉換成 <code>true</code>; 否則回傳 <code>true</code>.</td>
- </tr>
- </tbody>
-</table>
-
-<p>If a value can be converted to <code>true</code>, the value is so-called {{Glossary("truthy")}}. If a value can be converted to <code>false</code>, the value is so-called {{Glossary("falsy")}}.</p>
-
-<p>Examples of expressions that can be converted to false are:</p>
-
-<ul>
- <li><code>null</code>;</li>
- <li><code>NaN</code>;</li>
- <li><code>0</code>;</li>
- <li>empty string (<code>""</code> or <code>''</code> or <code>``</code>);</li>
- <li><code>undefined</code>.</li>
-</ul>
-
-<p>Even though the <code>&amp;&amp;</code> and <code>||</code> operators can be used with operands that are not Boolean values, they can still be considered boolean operators since their return values can always be converted to <a href="/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean primitives</a>. To explicitly convert their return value (or any expression in general) to the corresponding boolean value, use a double <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Logical_NOT">NOT operator</a> or the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a> constructor.</p>
-
-<h3 id="Short-circuit_evaluation">Short-circuit evaluation</h3>
-
-<p>As logical expressions are evaluated left to right, they are tested for possible "short-circuit" evaluation using the following rules:</p>
-
-<ul>
- <li><code>(some falsy expression) &amp;&amp; <em>expr</em></code> is short-circuit evaluated to the falsy expression;</li>
- <li><code>(some truthy expression) || <em>expr</em></code> is short-circuit evaluated to the truthy expression.</li>
-</ul>
-
-<p>Short circuit means that the <em>expr</em> parts above are <strong>not evaluated</strong>, hence any side effects of doing so do not take effect (e.g., if <em>expr</em> is a function call, the calling never takes place). This happens because the value of the operator is already determined after the evaluation of the first operand. See example:</p>
-
-<pre class="brush: js">function A(){ console.log('called A'); return false; }
-function B(){ console.log('called B'); return true; }
-
-console.log( A() &amp;&amp; B() );
-// logs "called A" due to the function call,
-// then logs false (which is the resulting value of the operator)
-
-console.log( B() || A() );
-// logs "called B" due to the function call,
-// then logs true (which is the resulting value of the operator)
-</pre>
-
-<h3 id="Operator_precedence">Operator precedence</h3>
-
-<p>The following expressions might seem equivalent, but they are not, because the <code>&amp;&amp;</code> operator is executed before the <code>||</code> operator (see <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">operator precedence</a>).</p>
-
-<pre class="brush: js">true || false &amp;&amp; false // returns true, because &amp;&amp; is executed first
-(true || false) &amp;&amp; false // returns false, because operator precedence cannot apply</pre>
-
-<h3 id="Logical_AND_()"><a name="Logical_AND">Logical AND (<code>&amp;&amp;</code>)</a></h3>
-
-<p>The following code shows examples of the <code>&amp;&amp;</code> (logical AND) operator.</p>
-
-<pre class="brush: js">a1 = true &amp;&amp; true // t &amp;&amp; t returns true
-a2 = true &amp;&amp; false // t &amp;&amp; f returns false
-a3 = false &amp;&amp; true // f &amp;&amp; t returns false
-a4 = false &amp;&amp; (3 == 4) // f &amp;&amp; f returns false
-a5 = 'Cat' &amp;&amp; 'Dog' // t &amp;&amp; t returns "Dog"
-a6 = false &amp;&amp; 'Cat' // f &amp;&amp; t returns false
-a7 = 'Cat' &amp;&amp; false // t &amp;&amp; f returns false
-a8 = '' &amp;&amp; false // f &amp;&amp; f returns ""
-a9 = false &amp;&amp; '' // f &amp;&amp; f returns false
-</pre>
-
-<h3 id="Logical_OR_()"><a name="Logical_OR">Logical OR (<code>||</code>)</a></h3>
-
-<p>The following code shows examples of the <code>||</code> (logical OR) operator.</p>
-
-<pre class="brush: js">o1 = true || true // t || t returns true
-o2 = false || true // f || t returns true
-o3 = true || false // t || f returns true
-o4 = false || (3 == 4) // f || f returns false
-o5 = 'Cat' || 'Dog' // t || t returns "Cat"
-o6 = false || 'Cat' // f || t returns "Cat"
-o7 = 'Cat' || false // t || f returns "Cat"
-o8 = '' || false // f || f returns false
-o9 = false || '' // f || f returns ""
-o10 = false || varObject // f || object returns varObject
-</pre>
-
-<h3 id="Logical_NOT_(!)"><a name="Logical_NOT">Logical NOT (<code>!</code>)</a></h3>
-
-<p>The following code shows examples of the <code>!</code> (logical NOT) operator.</p>
-
-<pre class="brush: js">n1 = !true // !t returns false
-n2 = !false // !f returns true
-n3 = !'' // !f returns true
-n4 = !'Cat' // !t returns false
-</pre>
-
-<h4 id="Double_NOT_(!!)">Double NOT (<code>!!</code>)</h4>
-
-<p>It is possible to use a couple of NOT operators in series to explicitly force the conversion of any value to the corresponding <a href="/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean primitive</a>. The conversion is based on the "truthyness" or "falsyness" of the value (see {{Glossary("truthy")}} and {{Glossary("falsy")}}).</p>
-
-<p>The same conversion can be done through the {{jsxref("Boolean")}} function.</p>
-
-<pre class="brush: js">n1 = !!true // !!truthy returns true
-n2 = !!{} // !!truthy returns true: <strong>any</strong> object is truthy...
-n3 = !!(new Boolean(false)) // ...even Boolean objects with a false <em>.valueOf()</em>!
-n4 = !!false // !!falsy returns false
-n5 = !!"" // !!falsy returns false
-n6 = !!Boolean(false) // !!falsy returns false
-</pre>
-
-<h3 id="Conversion_rules_for_booleans">Conversion rules for booleans</h3>
-
-<h4 id="Converting_AND_to_OR">Converting AND to OR</h4>
-
-<p>The following operation involving <strong>booleans</strong>:</p>
-
-<pre class="brush: js">bCondition1 &amp;&amp; bCondition2</pre>
-
-<p>is always equal to:</p>
-
-<pre class="brush: js">!(!bCondition1 || !bCondition2)</pre>
-
-<h4 id="Converting_OR_to_AND">Converting OR to AND</h4>
-
-<p>The following operation involving <strong>booleans</strong>:</p>
-
-<pre class="brush: js">bCondition1 || bCondition2</pre>
-
-<p>is always equal to:</p>
-
-<pre class="brush: js">!(!bCondition1 &amp;&amp; !bCondition2)</pre>
-
-<h4 id="Converting_between_NOTs">Converting between NOTs</h4>
-
-<p>The following operation involving <strong>booleans</strong>:</p>
-
-<pre class="brush: js">!!bCondition</pre>
-
-<p>is always equal to:</p>
-
-<pre class="brush: js">bCondition</pre>
-
-<h3 id="Removing_nested_parentheses">Removing nested parentheses</h3>
-
-<p>As logical expressions are evaluated left to right, it is always possible to remove parentheses from a complex expression following some rules.</p>
-
-<h4 id="Removing_nested_AND">Removing nested AND</h4>
-
-<p>The following composite operation involving <strong>booleans</strong>:</p>
-
-<pre class="brush: js">bCondition1 || (bCondition2 &amp;&amp; bCondition3)</pre>
-
-<p>is always equal to:</p>
-
-<pre class="brush: js">bCondition1 || bCondition2 &amp;&amp; bCondition3</pre>
-
-<h4 id="Removing_nested_OR">Removing nested OR</h4>
-
-<p>The following composite operation involving <strong>booleans</strong>:</p>
-
-<pre class="brush: js">bCondition1 &amp;&amp; (bCondition2 || bCondition3)</pre>
-
-<p>is always equal to:</p>
-
-<pre class="brush: js">!(!bCondition1 || !bCondition2 &amp;&amp; !bCondition3)</pre>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-11.11')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.4.9">Logical NOT Operator</a>, <a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.11">Binary Logical Operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-binary-logical-operators')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Defined in several sections of the specification: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-logical-not-operator">Logical NOT Operator</a>, <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-binary-logical-operators">Binary Logical Operators</a></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-binary-logical-operators')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td>Defined in several sections of the specification: <a href="http://tc39.github.io/ecma262/#sec-logical-not-operator">Logical NOT Operator</a>, <a href="http://tc39.github.io/ecma262/#sec-binary-logical-operators">Binary Logical Operators</a></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-
-
-<p>{{Compat("javascript.operators.logical")}}</p>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators">Bitwise operators</a></li>
- <li>{{jsxref("Boolean")}}</li>
- <li><a href="/en-US/docs/Glossary/Truthy">Truthy</a></li>
- <li><a href="/en-US/docs/Glossary/Falsy">Falsy</a></li>
-</ul>