1class Hello {
2 person(name){
3 this.name = name;
4 }
5 // Constructor - Important except for JSX
6 constructor(name){
7 this.person(name);
8 console.log(`Hello ${this.name}`);
9 }
10}
11
12const helloInstance = new Hello('john doe');