5.接口.js 269 B

123456789101112
  1. "use strict";
  2. (function () {
  3. class Person2 {
  4. constructor(name, age, color) {
  5. this.name = name;
  6. this.age1 = age;
  7. this.color = color;
  8. }
  9. }
  10. let p3 = new Person2('图图', 3, '红');
  11. console.log(p3);
  12. })();