In NodeJS and the browser, if you call Function.prototype(), it returns undefined.
Calling Function.prototype.toString() returns "function () { [native code] }".
Is this an empty function? Is it suitable to use in place of () => {} for defaults (e.g. default prop for React component)?
Aucun commentaire:
Enregistrer un commentaire