1.提取数据类型 function getType(value){ //基本上可以返回所有的类型,不论你是自定义还是原生 return Object.prototype.toString.ca
1.提取数据类型 function getType(value){ //基本上可以返回所有的类型,不论你是自定义还是原生 return Object.prototype.toString.call(value).match(//s{1}(/w+)/)[1];}let obj = new Object();console.log(getType(obj));
2.单词首字母大写popLastChecked:function(type){ if(this.lastChecked&&this.lastChecked.length>1&&this.lastChecked.slice(-1)==type){ var tmp=this.lastChecked[this.lastChecked.length-2]; console.log('1:'+tmp); this.lastChecked.push(tmp); }}