class Phone{
//构造方法
constructor(brand,price){
this.brand = brand
this.price = price
}
//对象里的方法
call(){
console.log('我能打电话')
}
}
//类的继承
class Photo extends Phone{
// 构造方法
constructor(brand,price,color,size){
super(brand,price) //使用父级属性
this.color= color
this.size= size
}
}