diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:08 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | f45e9e070c93ebbd83d488bdd775987a4d75c201 (patch) | |
tree | aacef5edaf768a188cadc46860f5b6aaa74f39ef /files/zh-tw/web/javascript/reference/functions/index.html | |
parent | 8ccfa93045a6c119303566370999f59a0aae3b25 (diff) | |
download | translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.gz translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.tar.bz2 translated-content-f45e9e070c93ebbd83d488bdd775987a4d75c201.zip |
fix yari h2m dry run errors
Diffstat (limited to 'files/zh-tw/web/javascript/reference/functions/index.html')
-rw-r--r-- | files/zh-tw/web/javascript/reference/functions/index.html | 137 |
1 files changed, 11 insertions, 126 deletions
diff --git a/files/zh-tw/web/javascript/reference/functions/index.html b/files/zh-tw/web/javascript/reference/functions/index.html index 0d64fa570a..464a1f311e 100644 --- a/files/zh-tw/web/javascript/reference/functions/index.html +++ b/files/zh-tw/web/javascript/reference/functions/index.html @@ -100,7 +100,7 @@ function myFunc(theObject) { <h3 id="The_generator_function_declaration_(function*_statement)">The generator function declaration (<code>function*</code> statement)</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Generator function are an <em>experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> @@ -122,7 +122,7 @@ function myFunc(theObject) { <h3 id="The_generator_function_expression_(function*_expression)">The generator function expression (<code>function*</code> expression)</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Generator function are an <em>experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> @@ -145,7 +145,7 @@ function myFunc(theObject) { <h3 id="箭頭函式_The_arrow_function_expression_(>)">箭頭函式 The arrow function expression (=>)</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Arrow function expressions are an <em>experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> @@ -167,7 +167,7 @@ param => expression <h3 id="The_Function_constructor">The <code>Function</code> constructor</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Using the <code>Function</code> constructor to create functions is not recommended since it needs the function body as a string which may prevent some JS engine optimizations and can also cause other problems.</p> </div> @@ -187,15 +187,15 @@ param => expression <h3 id="The_GeneratorFunction_constructor">The <code>GeneratorFunction</code> constructor</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Arrow function expressions are an <em>experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> <code>GeneratorFunction</code> is not a global object, but could be obtained from generator function instance (see {{jsxref("GeneratorFunction")}} for more detail).</p> </div> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Using the <code>GeneratorFunction</code> constructor to create functions is not recommended since it needs the function body as a string which may prevent some JS engine optimizations and can also cause other problems.</p> </div> @@ -215,7 +215,7 @@ param => expression <h2 id="Function_parameters">Function parameters</h2> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> Default and rest parameters are <em>experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> @@ -255,7 +255,7 @@ param => expression <h3 id="Method_definition_syntax">Method definition syntax</h3> -<div class="note"> +<div class="notecard note"> <p><strong>Note:</strong> <em>Method definitions are experimental technology,</em> part of the ECMAScript 6 proposal, and are not widely supported by browsers yet.</p> </div> @@ -453,126 +453,11 @@ result = padZeros(5,4); // returns "0005" <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>ECMAScript 1st Edition.</td> - <td>Standard</td> - <td>Initial definition. Implemented in JavaScript 1.0</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-13', 'Function Definition')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-function-definitions', 'Function definitions')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>New: Arrow functions, Generator functions, default parameters, rest parameters</td> - </tr> - <tr> - <td>{{SpecName('ES6', '#', 'function*')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Initial definition.</td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-arrow-function-definitions', 'Arrow Function Definitions')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Initial definition.</td> - </tr> - </tbody> -</table> +{{Specifications}} <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div> -<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> - <tr> - <td>Generator function</td> - <td>39</td> - <td>{{CompatGeckoDesktop("26.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>26</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>Arrow function</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoDesktop("22.0")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div> -<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> - <tr> - <td>Generator function</td> - <td>{{CompatUnknown}}</td> - <td>39</td> - <td>{{CompatGeckoMobile("26.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>26</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>Arrow function</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoMobile("22.0")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat}} <h2 id="See_also">See also</h2> |