前言:依赖库,只是应用;掌握核心,才能创造。
复习JavaScript原生,一点一点记录。
function fun(name,firstname,age,color){
this.name=name;
this.firstname=firstname;
this.age=age;
this.color=color;
}
var people1=new fun("sudonghao","su",20,"red");
console.log(people1.name+people1.firstname+people1.age+people1.color)//sudonghaosu20red
var people2=new fun("hanmeimei","han",18,"green");
console.log(people2.name+people2.firstname+people2.age+people2.color)//hanmeimeihan18green