我想我的代码是这样的:添加方法的方法
select("*").where("you='me'").and("me='him'").and("game='nes'");
我只有这个:
function select(selector){
this.where = function(where){
//Do something with where and select.
//Add the method AND <---
}
}
我不知道如何来添加方法的方法,其中添加。
什么好像你正在努力实现在调用'方法chaining',在这里读了一下:http://kwilson.me.uk/blog/simple-javascript-method-chaining/ –