微信扫一扫打赏支持

ES7参考---ES7相关

ES7参考---ES7相关

一、总结

一句话总结:

1、指数运算符(幂): **
2、Array.prototype.includes(value) : 判断数组中是否包含指定value
console.log(3 ** 3);//27
let arr = [1,2,3,4, 'abc'];
console.log(arr.includes(2));//true
console.log(arr.includes(5));//false

 

 

二、ES7相关

博客对应课程的视频位置:

 

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4   <meta charset="UTF-8">
 5   <title>Title</title>
 6 </head>
 7 <body>
 8 <!--
 9 1. 指数运算符(幂): **
10 2. Array.prototype.includes(value) : 判断数组中是否包含指定value
11 
12 -->
13 <script type="text/javascript">
14     console.log(3 ** 3);//27
15     let arr = [1,2,3,4, 'abc'];
16     console.log(arr.includes(2));//true
17     console.log(arr.includes(5));//false
18 </script>
19 </body>
20 </html>

 

 

 

 
posted @ 2020-03-29 00:47  范仁义  阅读(332)  评论(0)    收藏  举报