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);
}明白這個(gè)是怎么循環(huán)出來的嗎?
關(guān)于JavaScript中的for循環(huán)。
木子舟義
2015-12-23 01:01:58