Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

jump to level 1 loop through the array and output the values in order. …

Question

jump to level 1
loop through the array and output the values in order.
let friendsnames = \ann\, \bob\, \joe\,
on\ ; // tests will use different arrays
/ your solution goes here /

Explanation:

Step1: Use a for loop

for (let i = 0; i < friendsNames.length; i++) {

Step2: Output each element

    console.log(friendsNames[i]);
}

Answer:

for (let i = 0; i < friendsNames.length; i++) {
    console.log(friendsNames[i]);
}