ES7新特性
Array.prototype.includes
includes方法用来检测数组中是否包含某个元素,返回布尔类型值
指数操作符
在ES7中引入指数运算符,用来实现幂运算,功能与Math.pow结果相同
const mingzhu =['西游记','红楼梦','三国演义','水浒传'] // 判断 console.log(mingzhu.includes('西游记')) console.log(mingzhu.includes('金瓶梅')) console.log(210)

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/199282.html原文链接:https://javaforall.net
