Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ cannot assign to read-only property 'prototype' of function 'xxx'
:
class A {} A.prototype = {}; // ⛔ TypeError // ^^^^ // ⛔ TypeError: // Cannot assign to read only property 'prototype' of function 'class A {}'
a 's (property) is read-only