SOURCE

let obj = {
    a: 1,
    b: 2
}

let subObj = {
    c: 3
}

Object.setPrototypeOf(subObj, obj)
console.log(subObj.a)
let sObj = Object.create(obj)
console.log(Object.getPrototypeOf(sObj))
console.log(sObj.__proto__)
console.log(Object.getPrototypeOf(subObj))
console.log(Object.keys(subObj))

for (let i in subObj) {
    console.log(subObj[i])
}


function rabbit() {
    console.log(1111)
}

let ra = new rabbit()
console.log(ra.constructor === rabbit)


let arr = [1, 2, 3]
console.log(arr.__proto__)
console.log(arr.__proto__.__proto__)
console.log(arr.__proto__.__proto__.__proto__)
function fun() {}
console.log(fun.__proto__)
console.log(fun.__proto__.__proto__)
let num = 6.66
console.log(num.__proto__)
console.log(num.__proto__.__proto__)
let boo = true
console.log(boo.__proto__)
console.log(boo.__proto__.__proto__)


console 命令行工具 X clear

                    
>
console