标签:题集 ret original gre origin tin bsp 实现 wrap
1.实现warp
function speak(name){
return "Hello " + name;
}
speak = speak.wrap(function(original, yourName, myName){
greeting = original(yourName);
return greeting + ", my name is " + myName;
})
var greeting = speak("Mary", "Kate");
标签:题集 ret original gre origin tin bsp 实现 wrap
原文地址:http://www.cnblogs.com/tong24/p/7305825.html