Alguien puede explicar por qué esto funciona:
Object.defineProperty(Array.prototype, 'getRandom', { value: function(){return this[randomInt(0, this.length)]} })Pero, ¿por qué esto no funciona?
Object.defineProperty(Array.prototype, 'getRandom', { value: () => this[randomInt(0, this.length)] })