12345678910111213141516171819202122 |
- "use strict";
- (function () {
- // 类去继承接口
- class Person {
- constructor(name1, name2, name3) {
- this.name1 = name1;
- this.name2 = name2;
- this.name3 = name3;
- }
- say() {
- console.log(this.name1, this.name2, this.name3);
- }
- }
- let p = new Person('水仙', "1", "1");
- console.log(p);
- p.say();
- const aa = {
- color: 'red',
- flower: '牡丹'
- };
- console.log(aa);
- })();
|