GO-V.ORG
As seen in

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

6 results across 6 corpora for GeneratorFunction.prototype.prototype.

Developer library 6

Generator

created by generator functions. This object is often stylized as `Generator.prototype` to make it look like a class, but it should be more appropriately called GeneratorFunction.prototype.prototype, because `GeneratorFunction` is an actual JavaScript entity. To understand the prototype chain of `Generator` instances, see GeneratorFunction.prototype.prototype. ## Instance properties These properties are defined on `

Function

ction`](/docs/Web/JavaScript/Reference/Statements/function) - [`function` expression](/docs/Web/JavaScript/Reference/Operators/function) - AsyncFunction - AsyncGeneratorFunction - GeneratorFunction - Functions

Function: prototype

rator functions](/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`: ```js async function* asyncGeneratorFunction() {} function* generatorFunction() {} ``` Instead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](/docs/Web/JavaScript/Reference/Global_

GeneratorFunction

The **`GeneratorFunction`** object provides methods for [generator functions](/docs/Web/JavaScript/Reference/Statements/function*). In JavaScript, every generator function is actually a `GeneratorFunction` object. Note that `GeneratorFunction` is _not_ a global object. It can be obtained with the following code: ```js const GeneratorFunction = function* () {}.constructor; ``` `GeneratorFunction` is a subclass of F

GeneratorFunction.prototype.prototype

The **`prototype`** property of `GeneratorFunction.prototype` is shared by all generator functions. Its value is [`Generator.prototype`](/docs/Web/JavaScript/Reference/Global_Objects/Generator). Each generator function created with the `function*` syntax or the `GeneratorFunction()` constructor also has its own `prototype` property, whose prototype is `GeneratorFunction.prototype.prototype`. When the generator functi

Symbol.toStringTag

ect.prototype.toString` on it. ```js Object.prototype.toString.call(new Map()); // "[object Map]" Object.prototype.toString.call(function* () {}); // "[object GeneratorFunction]" Object.prototype.toString.call(Promise.resolve()); // "[object Promise]" // … and more ``` ### Custom tag with toStringTag When creating your own class, JavaScript defaults to the "Object" tag: ```js class ValidatorClass {} Object.proto

JSON results · Services directory