e há 11 meses atrás
pai
commit
099b812e7a
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      es6/8.对象的扩展方法.html

+ 2 - 2
es6/8.对象的扩展方法.html

@@ -29,7 +29,7 @@
         // console.log(Object.setPrototypeOf(obj3,arr));
         // h5 =>  localStorage 中的 setItem 和 getItem
         // 3.Object.setPrototypeOf 自定义对象设置属性
-        let newObj = Object.setPrototypeOf(arr,obj3);
+        let newObj = Object.setPrototypeOf(obj3,arr);
         // 4.Object.getPrototypeOf 读取自定义对象属性
         console.log(Object.getPrototypeOf(newObj))
 
@@ -44,7 +44,7 @@
         console.log(Object.entries(obj4),'entries');
         // 7.Object.values() 返回当前对象中可枚举的属性值
         console.log(Object.values(obj4),'values');
-        
+
     </script>
 </body>
 </html>