1-1 基本数据类型number,string,boolean,undefined,null
判断数组:
let arr = []1. instanceofarr instanceof Array2. __proto__arr.__proto__ === Array.prototype3. constructorarr.constructor === Array4. Object.prototype.toStringObject.prototype.toString.call(arr) === '[object Array]'5. Array.isArrayArray.isArray(arr)
1-2 引用数据类型 Array,Function,Object
var arr = [1,2,3];function go(){console.log("hello world")}go();var obj ={name:"zhang",age:18}console.log(obj.name); //读取对象的某个属性
1-5 数组的方法 push,unshift,forEach
let arr = ["html","css"];// 1.push 向数组的后面添加arr.push("js")console.log(arr);// 2.unshift 向数组的前面添加值arr.unshift("vue");console.log(arr);//3.forEachlet arr = ["html","css","js"];// forEach遍历arr.forEach(function(item){console.log(item)})
