JavaScript
Exercise 12 / 15
Arrays and Loops
Medium
20 points
Create an array with 3 fruits and display each fruit with a forEach loop.
JavaScript arrays store ordered collections. [] creates an array, push() adds an element, forEach() iterates through all elements. Arrays are fundamental in JavaScript.
Well done! 🎉
Your answer is correct! You earned 20 points.
Not quite...
Try again! You can do it.
Your code
JavaScript
Result