Skip to content

Commit 8266e46

Browse files
committed
测试object'.create以及setprototypeof
1 parent 518222f commit 8266e46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

动态规划算法/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@
117117
console.log(f.colors)
118118
console.log(p.colors)
119119

120+
let pp = Object.create(f, { name: { value: 555 } })
121+
console.log(pp.__proto__ == f)
122+
console.log(pp.name)
123+
120124

121125
// let f = new foo('heshihao', 19)
122126
// console.log(f)

0 commit comments

Comments
 (0)