Suchergebnisse für Anfrage "prototype-programming"
Warum ruft das Boolesche Primitiv den Prototyp nicht toString () auf?
Sag ich habe diesen Code: Boolean.prototype.toString = function toString() { return this.valueOf() ? '1' : '0'; }; var object = { true: 'true', false: 'false', 1: '1', 0: '0' }; // "true" - this doesn't work console.log('primitive', ...
Seite 2 von 2