How to prevent changes to a prototype?
问题 In this code, the prototype can still change. How I can prevent changes to the prototype? var a = {a:1} var b={b:1} var c = Object.create(a) Object.getPrototypeOf(c) //a c.__proto__ = b; Object.getPrototypeOf(c) //b var d = Object.create(null) Object.getPrototypeOf(d) //null d.__proto__ = b; Object.getPrototypeOf(d) //null 回答1: How I can prevent changes to the prototype? I assume you are not talking about mutating the prototype object itself, but overwriting the prototype of an existing