javascript数据变量类型判断(JS变量是否是数组,是否是函数的判断)
function isArray(o) {
return Object.prototype.toString.apply(o) === “[object Array]”;
}
function isFunction(o) {
return Object.prototype.toString.apply(o) === ”[object Function]“;
}
--JQuery 源码有....
function isArray(o) {
return Object.prototype.toString.apply(o) === “[object Array]”;
}
function isFunction(o) {
return Object.prototype.toString.apply(o) === ”[object Function]“;
}
--JQuery 源码有....