What do you need explanation for? It’s an array with arrays inside. And then these have arrays inside them.
You adress them like you adress normal arrays, just stacked.
Hah, that’s strange. Just tested it out and both your version and mine give the results when I try.
Still doesn’t seem like the best way to structure an array
Good thing someone recently had some issues with arrays → turns out JS is able to treat one-element arrays as if they were just the element, without an array.
So it might have just done that in your solution. If mine was incorrect, it would have gone one layer deeper with the index. And as strings are secretly immutable arrays (kinda) it should have shown just the characte at index 1 “e”.
If you add a second element to the array, there should be a difference inbetween our solutions