',null,true];
new Array(1,2,3,'hello');
console.msg(arr[0]);
// 越界是未定义
对象
// 对象大括号,数组中括号
// 每个属性用,隔开...for(let i in age)
{
}
for(let x of age) // x为具体的值(未定义的值?)...== 'number'){
throw 'not a Number';
}
// rest - 获取已经定义的参数之外的所有参数
// 只能写在最后,前面用 ......自己弄一个类, 绑定在这个唯一全局变量中, 而不去绑定在window这个全局变量中, 来降低全局命名冲突 + 和别人不冲突
jQuery的实现类似(?) - jQuery....= '';
id1.style.padding = '';
删除节点
先获得父节点和它, 再删除它
// father和p1都事先获取
father.removeChild(p1);
// 删除是动态的过程