<script type="text/javascript">
const a = {a:1}
console.log(a)
console.log("===================")
const b = Object.create(null,{
a: {
writable:true,
configurable:true,
value: 2
}
})
console.log(b)
console.log("===================")
const c = Object.create(Object.prototype,{
a:{
writable:true,
configurable:true,
value:3
}
})
console.log(c)
</script>
Created
September 5, 2019 08:40
-
-
Save blanklin030/81816fca2cd259dfcd1b2a38fd49e961 to your computer and use it in GitHub Desktop.
Object.create的用法
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment