class Person{ // 构造 constructor(x,y){ this.x = x; this.y = y; } toString(){ return (this.x + "的年龄是" +this.y+"岁"); } } export {Person};
//index.js import {Person} from './Person'; let person = new Person('张三',12); console.log(person.toString());
木子炜培先生⑴2017底=>(年薪15万)=>31岁 ⑵2018=》(生产生活用品)并且年薪20万=>32岁 ⑶2019=>年薪30万=>把小作坊升级为工厂=>33岁 ⑷2020=>再开一个食品工厂 |