Loop Quest: Count the Stars
You are a space explorer. Write the output of the loop to collect stars from 1 to 5 as a comma-separated list.
Challenge
for (let i = 1; i <= 5; i++) {
stars.push(i);
}
expected output: 1,2,3,4,5
Ready when you are! Solve the loop and check your answer.
Challenge 1 / 3 ยท Attempts: 0 | Successes: 0
๐
Great job! You completed this challenge.
Hint: Use a for loop i = 1 ...