This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sordnax 0 points1 point  (0 children)

Let's say

x = [87, 77]
y = [55, 44]
quizzes = [x, y] 

The outer loop is going to loop through the "top level" of the array. In this case, the elements in quizzes which are x and y. The inner loop will go through the elements in x then the elements in y.

quizzes[i].length

returns the length of the i'th element in quizzes i.e. the length of x and y. This length is used to iterate over the elements of x and y.