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.
For...of loop
Count function
Report a typo
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;
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.