Array Equivalency

arr1 = [1, 2, 3]
arr2 = [1, 2, 3]
arr1 === arr2
via repl.it
Welcome to Flavortown
https://knowyourmeme.com/photos/1138248-guy-fieri
solution = [empty, piece1, piece2, piece3, piece4, piece5, piece6, piece7, piece8];currentBoard = [piece1, piece7, empty, piece4, piece5, piece3, piece8, piece2, piece6];
if (solution === currentBoard) {
gameOver();
}
sad man
if (JSON.stringify(solution) === JSON.stringify(currentBoard)){
gameOver();
}
https://firstwefeast.com/features/guy-fieri-vocabulary-cheat-sheet/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store