考虑以下代码:
let a = [
["10.237.77.82", "10.237.79.255"],
["10.237.78.2", "230.0.0.1"],
["10.237.78.2", "10.237.79.255"]
]
console.log(a.includes(["10.237.77.82", "10.237.79.255"]))
我期望includes()
找到数组["10.237.77.82", "10.237.79.255"]
,为什么不这样呢?
Array.prototype.includes() documentation似乎并未建议“可建立”的特定元素(尽管示例仅使用整数或字符串)