2 votes
Get multiple indexes of an array at once, for comparison
This syntax is the problem: gameBoard[0, 3, 6] Although it doesn't crash the script, it also won't do what you're expecting it to. It will effectively just test the last index you've listed there, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
object × 64996javascript × 26794
arrays × 18444
java × 9530
class × 6094
json × 4872
php × 4728
python × 4315
c# × 3845
c++ × 3567
oop × 3181
jquery × 2829
reactjs × 2400
function × 2070
methods × 1637
list × 1587
node.js × 1404
loops × 1401
string × 1324
typescript × 1293
html × 1224
properties × 1186
ecmascript-6 × 1087
arraylist × 1085
constructor × 1077