Skip to content

Commit 58e2933

Browse files
authored
Create rew.js
1 parent 65ddfce commit 58e2933

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

rew.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Person {
2+
constructor(name, age) {
3+
this.name = name;
4+
this.age = age;
5+
}
6+
7+
greet(){
8+
console.log(`Hello ${this.name}`);
9+
}
10+
}
11+
12+
const person2 = new Person('Diana', 28);
13+
console.log(person2.age `${age}`);
14+
person2.greet();
15+

0 commit comments

Comments
 (0)