In the javascript inside the definition of a class you can now use the keyword class, example:
class Chef{ constructor(food){ this.food = food; } cook(){ console.log(this.food) } } let zhangsan =new Chef(‘eggs’); //eggs
Based on an instance of this class is created automatically performs constructor method, you can put some initialization method on constructor inside
This example zhangsan chef can use this class which method