From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../global_objects/function/arity/index.html | 16 --------- .../global_objects/function/isgenerator/index.html | 40 ---------------------- 2 files changed, 56 deletions(-) delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/function/arity/index.html delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/function/isgenerator/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/function') diff --git a/files/zh-cn/web/javascript/reference/global_objects/function/arity/index.html b/files/zh-cn/web/javascript/reference/global_objects/function/arity/index.html deleted file mode 100644 index d8e8668ca2..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/function/arity/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Function.arity -slug: Web/JavaScript/Reference/Global_Objects/Function/arity -translation_of: Archive/Web/JavaScript/Function.arity ---- -
-
{{JSRef("Global_Objects", "Function")}} {{obsolete_header}}
-
- -

概述

- -

返回一个函数的形参数量.

- -

描述

- -

arity是一个古老的已经没有浏览器支持的属性,你应该使用Function.prototype.length属性来代替.

diff --git a/files/zh-cn/web/javascript/reference/global_objects/function/isgenerator/index.html b/files/zh-cn/web/javascript/reference/global_objects/function/isgenerator/index.html deleted file mode 100644 index f377f0a210..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/function/isgenerator/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Function.prototype.isGenerator() -slug: Web/JavaScript/Reference/Global_Objects/Function/isGenerator -translation_of: Archive/Web/JavaScript/Function.isGenerator ---- -
{{JSRef("Global_Objects", "Function")}} {{non-standard_header}}
- -

概述

- -

判断一个函数是否是一个生成器.

- -

语法

- -
fun.isGenerator()
- -

描述

- -

该方法用来判断一个函数是否是一个生成器.

- -

例子

- -
function f() {}
-function* g() {
-  yield 42;
-}
-console.log("f.isGenerator() = " + f.isGenerator());
-console.log("g.isGenerator() = " + g.isGenerator());
-
- -

上面代码的输出结果为

- -
f.isGenerator() = false
-g.isGenerator() = true
-
- -

相关链接

- - -- cgit v1.2.3-54-g00ecf