标签:name turn ros mic func mil foo strong this
什么是js面向对象?
function Foo(name,age){
this.Name = name;
this,Age = age;
this.Fun = function(arg){
return this.Name+arg;
}
}
var obj = new Foo(‘yizhihua’,’18’);
console.log(obj.Name);
console.log(obj.Age);
var res = obj.Foo(‘mei’)
console.log(res)
标签:name turn ros mic func mil foo strong this
原文地址:http://www.cnblogs.com/2bjiujiu/p/7002869.html