Hey everyone, how is it going?
Well, I was trying to get a value from an array based on the indexOf:
var solution = [
[0, 1, 1, 0, 0, 0, 0, 1, 1, 0],
[0, 0, 0, 1, 0, 0, 1, 0, 0, 0],
[0, 0, 1, 1, 1, 1, 1, 1, 0, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[1, 1, 1, 0, 1, 1, 0, 1, 1, 1],
[1, 0, 1, 1, 1, 1, 1, 1, 0, 1],
[1, 0, 1, 1, 1, 1, 1, 1, 0, 1],
[0, 0, 1, 0, 0, 0, 0, 1, 0, 0],
[0, 0, 0, 1, 0, 0, 1, 0, 0, 0]
];
console.log(solution[1].indexOf(solution[1][3])
But for a reason, I don’t know why it logs 3, not 1. There’s only 1’s but it stills returning 3. The same occurs for others line, such as console.log(solution[2].indexOf(solution[1][3]) that returns 2.
If anyone knows and can help me, it would be great 
Thank you and Keep Coding!