/**返回值
* 基本数据类型:Number,String,Undefined,Null,Boolean,Symbol
* 引用数据类型:Function,Array,Object
*/
function getType(val) {
let rst = Object.prototype.toString.call(val);
return rst.substring(1, rst.length - 1).split(' ')[1];
}
/**返回值
* 基本数据类型:Number,String,Undefined,Null,Boolean,Symbol
* 引用数据类型:Function,Array,Object
*/
function getType(val) {
let rst = Object.prototype.toString.call(val);
return rst.substring(1, rst.length - 1).split(' ')[1];
}