//数据类型判断 const demo = function(val) { return Object.prototype.toString.call(val) } var data = demo(1) console.log(data) class Father { constructor(x,y){ } say(){ console.log(11) } } class Son extends Father { constructor(x, y){ super(x,y) } say(){ console.log(super.say()) } subtract(){ console.log(this.x - this.y) } } var son = new Son(5,3) son.subtract()