Last updated 2 years ago
JS ⟩ error ⟩ TypeError ⟩ cannot assign to read-only property 'prototype' of function 'xxx'
TypeError: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 class's prototype (property) is read-only