var Type = {};
for(var i = 0 ,type;type = ['String','Array','Number'][i++];){
(function(type){
Type['is'+type] = function(obj){
return Object.prototype.toString.call(obj) === '[object ' + type +']';
}
})(type);
}明白这个是怎么循环出来的吗?
添加回答
举报
0/150
提交
取消