Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 471

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 480

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 487

Warning: Attempt to read property "description" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 489

Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 493

0918卢雨杰

学习内容

四大属性:

value//属性值

writable//是否可以修改当前属性,true可以修改false不可以修改,默认值为false

enumerable//控制是否可以用for in 遍历循环

configurable//1控制是否可以删除该属性,2是否可以修改前两个属性

自定义继承:

Object.creat(),创建一个新的对象,继承父对象的属性,同时可以添加属于新对象的自己的睡醒

防扩展:Object.PreventExtensions(change)

在兼具防扩展的同时又进一步禁止删除属性,不影响修改属性值:

Object.seal(change)

学习心得

​ 保镖的部分有点绕,不是很明白怎么进行保护的

评论留言