Count function

Report a typo

Arrange the lines of code in the correct order to get a function that counts how many iterations the for...of loop has made and returns this value.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                for(let element of arr) {
              
                }
              
                count++;
              
                }
              
                let count = 0;
              
                function counter(arr) {
              
                return count;
              
___

Create a free account to access the full topic