/**
* JS基础知识: 变量的类型和计算、原型和原型链、作用域和闭包
* JS Web API DOM、BOM、事件绑定、ajax、存储
*/
/**
* DOM是哪种数据结构 -- 树
* DOM操作的常用api -- dom节点操作 、dom结构操作 attrbute、property
* attr 和 property 的区别
* 一次性插入多个dom节点,考虑性能
*
* DOM的本质是一棵树Tree,HTML语言解析出来的一棵树
*
* property形式 通过修改、获取js属性的方式改变页面渲染结构的形式, 不会体现到html结构中
* attribute setAttribute/getAttribute 修改html属性 会改变html结构
* 两个都会是dom重新渲染,建议使用property
*
* dom 性能考虑
* 多次操作改为一次性操作 创建一个文档片段(createDocumentFragment)插入完成再插到dom树种 document.createDocumentFragment()
* 多个dom遍历 提取length
*/
/**
* BOM: navigation、screen、location、history
* 拿浏览器信息
* const ua = navigator.userAgent
* const isChrome = ua.indexOf('Chrome')
*
* screen.width
*
* location.pathname
*
* history.back()
*/
console