02 2022 档案

摘要:众所周知JS的数据类型原来有七种,ES2020 引入了一种新的数据类型 BigInt(大整数),所以共有8种 使用typeof /**5个基本**/ console.log(typeof 'str') // > string console.log(typeof 1) // > number con 阅读全文
posted @ 2022-02-14 11:40 时间观测者 阅读(74) 评论(0) 推荐(0) 编辑
摘要:主要用两种方法 instanceof或者constructor var arr = [ 1 , 2 , 3 ]; console.log(arr instanceof Array); // true console.log(arr instanceof Object); // true consol 阅读全文
posted @ 2022-02-07 15:58 时间观测者 阅读(476) 评论(0) 推荐(0) 编辑
摘要:浅拷贝 : 只是将数据中所有的数据引用下来,依旧指向同一个存放地址,拷贝之后的数据修改之后,也会影响到原数据的中的对象数据。例如:Object.assign()层级一级以上,,...扩展运算符 深拷贝: 将数据中所有的数据拷贝下来,对拷贝之后的数据进行修改不会影响到原数据。 JSON.parse(J 阅读全文
posted @ 2022-02-07 14:21 时间观测者 阅读(2404) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示