【发布时间】:2021-07-18 15:31:42
【问题描述】:
我找不到使用方法every() 的解决方案。我想看看每个坐标(x 和 y)是否
这是我的代码:
const shipLocation = [ [ 2, 3 ], [ 3, 3 ], [ 4, 3 ], [ 5, 3 ], [ 6, 3 ] ]
const outOfBounds = function (shipLocation) {
Array.every(locationPoint =>
// code here!
locationPoint <= 10;
);
};
谢谢。
【问题讨论】:
标签: javascript loops methods