★ wanayoo — archive 1999 https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Statements/Legacy_generator_functionNouvelle recherche | Portail wanayoo

Legacy generator function

di 2 collaboratori:
I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Registrati per tradurlo tu.
The legacy generator function is a SpiderMonkey-specific feature, and will be removed at some point. For future-facing usages, consider using function*.

The legacy generator function statement declares legacy generator functions with the specified parameters.

You can also define functions using the Function constructor with functionBody and at least one yield expression, and a legacy generator function expression.

Syntax

function name([param,[, param,[..., param]]]) {
   [statements]
}
name
The function name.
param
The name of an argument to be passed to the function. A function can have up to 255 arguments.
statements
The statements which comprise the body of the function. This should contain at least one yield expression.

Description

An overview of the usage is available on the Iterators and Generators page.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported (Yes) Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported (Yes) Not supported Not supported Not supported

See also

Etichette del documento e nomi di chi ha collaborato alla sua stesura

Contributors to this page: fscholz, arai
Ultima modifica di: fscholz,
Nascondi barra laterale