为什么这个过滤器从不返回任何对象?
NewHashMap.prototype.remove = function (keys, obj) {
// snip
var myEntries = this.entries;
var filteredEntries = myEntries.filter(
function(entry){
//me.isContainedBy(entry, keys) &&
//entry.obj === obj
true;
});
console.debug("entries ", myEntries.length);
console.debug("filtered ", filteredEntries.length);
// snip
}
再进一步,我在不同的上下文中使用它并且它有效。
您还看到我注释掉了我的实际过滤器要求并用纯 True 替换它们。一样。
我猜这是一个上下文问题,但我不知道在哪里。