Challenge: Favorite Colors
Task
Swipe to start coding
Practice working with arrays by defining and displaying your favorite colors.
- Create a new array called
favoriteColorsand initialize it with five color names of your choice. - Loop through each element in the
favoriteColorsarray. - Print each color to the console on a separate line.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 3.57
Challenge: Favorite Colors
Swipe to show menu
Task
Swipe to start coding
Practice working with arrays by defining and displaying your favorite colors.
- Create a new array called
favoriteColorsand initialize it with five color names of your choice. - Loop through each element in the
favoriteColorsarray. - Print each color to the console on a separate line.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 2
single