| 123456789101112131415 |
- "use strict";
- // function Person() {
- // }
- (function () {
- class Person {
- constructor(name, age) {
- console.log(this, 'this1');
- this.name = name;
- this.age = age;
- console.log(this, 'this2');
- }
- }
- let p1 = new Person("孙悟空", 30);
- let p2 = new Person("猪八戒", 40);
- })();
|