check every element of an array
This question already has an answer here:
您可以在一行函数中使用Array.prototype.every()
arr = ["foo","azeaze", "wazeazerar"]
const isittrue = currentval => currentval.length > 2
console.log(arr.every(isittrue));
链接地址: http://www.djcxy.com/p/70036.html
下一篇: 检查数组的每个元素