<script>
class Student{
constructor(name,age){
this.name=name
this.age=age
this.say=function(){
console.log('hhh')
}
}
myName(){
console.log('xxxxxxxxx')
}
}
let s=new Student('张胜男',18)
console.log(s)
</script>
es6 class关键字
最新推荐文章于 2024-07-09 18:13:44 发布