I tried this exercises in many ways, i did a search in google and saw many answer… and some help me a lot but i still with doubts!
- In this page i can try all the exercises if someone need see the results of the exercises for understand better i leave here: https://repl.it/repls/BetterAthleticWeb
- This is the exercise:
var arr = [
[1,2], [3,4], [5,6]
];
for (var i=0; i < arr.length; i++) {
for (var j=0; j < arr[i].length; j++) {
console.log(arr[i][j]);
}
}
I need if someone can explain me why if the var i=0 my output is 123456 and when i change to var i = 1 my output is 3456… Thank you a lot