代码如下:
(function(name){
console.log("this's" + name);
}('this'schen hong'));
输出结果:
this'schen hong
代码如下:
var person = {
add:function(){
console.log('This is add()');
},
edit:function(){
console.log('This is edit()');
}
};
person.add();
person.edit();
person.delete=function(){
console.log('This is delete');
}
person.delete();