class Student { constructor(name, gender, age) { this.name = name this.gender = gender this.age = age } greeting() { console.log(this.name + ' say: hi,there.'); } }
let stu = new Student('gl', 'male', 40) stu.greeting()