-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object.freeze() #11
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Object.freeze()
冻结指的是不能向这个对象添加新的属性,不能修改其已有属性的值,不能删除已有属性,以及不能修改该对象已有属性的可枚举性、可配置性、可写性。该方法返回被冻结的对象
资料来自
MDN文档Object.freeze()
语法
Object.freeze(obj)
重点
1.这个只能冻一层,里层对象冻不住。2.这个方法返回传递的对象,而不是创建一个被冻结的副本。
Object.isFrozen()
Object.isFrozen()方法判断一个对象是否被冻结。
The text was updated successfully, but these errors were encountered: