Application

Report a typo

Complete the loopArray function with the for...of loop, which iterates over the array accepted by the function, and print each element to the console. If the number 3 is encountered as an element in the array, the loop must be interrupted.

Write a program in JavaScript
function loopArray(arr){
// write your code here

}
___

Create a free account to access the full topic