@[TOC]
1. 求幂运算符
Math.pow(3,2) === 3**2 // 9
2. 数组的includes()
[1,2,NaN].includes (NaN) // true [1,2,NaN].indexOf (NaN) //-1
如果仅仅查找数据是否在数组中,建议使用includes() ; 如果是查找数据的索引位置,建议使用indexOf() 更好一些.
mb660d456b8c027 ©著作权
文章标签 数组 数据 Math 文章分类 JavaScript 前端开发
@[TOC]
Math.pow(3,2) === 3**2 // 9
[1,2,NaN].includes (NaN) // true [1,2,NaN].indexOf (NaN) //-1
如果仅仅查找数据是否在数组中,建议使用includes() ; 如果是查找数据的索引位置,建议使用indexOf() 更好一些.
简介 自从ES6(ECMAScript 2015)在2015年发布以来,ECMAScript以每年一个版本的速度
快速通道:ES6、ES7、ES8、ES9、ES10、ES11、ES12、ES13新
一文搞定这些新特性!
前言从 ECMAScript 2016(ES7)开始,版本发布变得更加频繁
ES6、 ES7、 ES8、 ES9、 ES10新特性概览
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M