From f45e9e070c93ebbd83d488bdd775987a4d75c201 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:08 +0800 Subject: fix yari h2m dry run errors --- .../javascript/reference/functions/method_definitions/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-tw/web/javascript/reference/functions/method_definitions/index.html') diff --git a/files/zh-tw/web/javascript/reference/functions/method_definitions/index.html b/files/zh-tw/web/javascript/reference/functions/method_definitions/index.html index 15aeef0f00..b56c884503 100644 --- a/files/zh-tw/web/javascript/reference/functions/method_definitions/index.html +++ b/files/zh-tw/web/javascript/reference/functions/method_definitions/index.html @@ -69,7 +69,7 @@ translation_of: Web/JavaScript/Reference/Functions/Method_definitions -
// Using a named property
+
// Using a named property
 var obj2 = {
   g: function* () {
     var index = 0;
@@ -95,7 +95,7 @@ console.log(it.next().value); // 1

{{jsxref("Statements/async_function", "Async 方法", "", 1)}} 也可以透過簡短語法定義。

-
// Using a named property
+
// Using a named property
 var obj3 = {
   f: async function () {
     await some_promise;
@@ -150,7 +150,7 @@ new obj.g; // TypeError: obj.g is not a constructor (changed in ES2016)
 
 

Simple test case

-
var obj = {
+
var obj = {
   a: 'foo',
   b() { return this.a; }
 };
@@ -161,7 +161,7 @@ console.log(obj.b()); // "foo"
 
 

The shorthand syntax also supports computed property names.

-
var bar = {
+
var bar = {
   foo0: function() { return 0; },
   foo1() { return 1; },
   ['foo' + 2]() { return 2; }
-- 
cgit v1.2.3-54-g00ecf