SOURCE

let that
function charactor(uname, age) {
    that = this
    this.uname = uname
    this.age = age
    charactor.prototype.sing = function () {
        console.log('死歌开大辣')
    }
}

const jiusi = new charactor('九祀', 18)
// console.log(that === jiusi)//验证构造函数中的this指向的是实例对象
console.log(jiusi)
console 命令行工具 X clear

                    
>
console