var itemList = [{id:1, name:"A"}, {id:2, name:"B"}, {id:3, name:"C"}, {id:4, name:"D"}];
var _itmes = itemList.filter(function(item, index, array)
{
console.log(this); <- "hello" String 객체
return item.id > 2;
}, "hello");
_itmes
(2) [{…}, {…}]
예제)
isConfirmer : function()
{
var _confirmer = this.domHost.acu.filter(function(item, index, array)
{
return item.awc_cnfm_id == this.domHost.sessionUser.usr_id;
}, this);
return _confirmer.length > 0;
},