mdn / sprints

Archived: MDN Web Docs issues are tracked in the content repository.
https://github.com/mdn/content
Creative Commons Zero v1.0 Universal
150 stars 142 forks source link

https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Function/apply #3957

Closed fpierrat closed 3 years ago

fpierrat commented 3 years ago

Request type

Details

Section "Examples", first example => definition of a method named "construct()":

Function.prototype.construct = function (aArgs) {...}

=> use case: call of a method named "constructor()":

function MonConstructeur () {...}
...
var monInstance = MonConstructeur.constructor(monTableau);

Either I haven't understood anything at all, or the method which should be called is "construct()":

var monInstance = MonConstructeur.construct(monTableau);

https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Function/apply

chrisdavidmills commented 3 years ago

Issue moved to mdn/content #1440 via ZenHub