I have multiple arrays inside an array and I would like to match one of those array with a new array that I created.
How can I check if the custom array match any of the winning combos?
Here is my code
let customNumbersArray = [];
const winningCombosArray = [
[1, 2, 3]
[4, 5, 6],
[5, 6, 7],
[1, 2, 3, 4],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5, 6],
[1, 2, 3, 4, 5, 6, 7]
]
customNumbersArray.push(e.target.dataset.customnumber1)
customNumbersArray.push(e.target.dataset.customnumber2)
customNumbersArray.push(e.target.dataset.customnumber3)
customNumbersArray.push(e.target.dataset.customnumber4)
customNumbersArray.push(e.target.dataset.customnumber5)
customNumbersArray.push(e.target.dataset.customnumber6)
customNumbersArray.push(e.target.dataset.customnumber7)