标签:des asc code rip script class 代码片段 元素 includes
1、includes,判断元素是否存在数组中
[‘a‘, ‘b‘].includes(‘a‘) // true
2、filter,对数组进行过滤
let a = [1,2,3].filter(val => val > 2) // a = 3
3、Number函数换成+
let a = ‘1‘ +a // 1
标签:des asc code rip script class 代码片段 元素 includes
原文地址:https://www.cnblogs.com/xcjsj106/p/10863676.html