js 闭包

 

// 判断类型
function isType(type) {
    return function(obj) {
        return Object.prototype.toString.call(obj) === '[object ' + type + ']';
    }
}

 

posted @ 2014-08-25 17:39  qingyezhu  阅读(98)  评论(0编辑  收藏  举报