非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
Obsolete since Gecko 58 (Firefox 58 / Thunderbird 58 / SeaMonkey 2.55)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
function* 表达式
.
function
keyword can be used to define a legacy generator function inside an expression. To make the function a legacy generator, the function body should contain at least one
yield
表达式。
function [name]([param1[, param2[, ..., paramN]]]) {
statements
}
name
paramN
The name of an argument to be passed to the function. A function can have up to 255 arguments.
statements
yield
表达式。
An overview of the usage is available on the Iterators and Generators 页面。
Supported nowhere.
Generator
yield
function
函数表达式
Function
function*
function* 表达式
GeneratorFunction