Codington
0 of 10 problems solved • 0%
Use in a course

Exercise prompt

Visit Values with for...of

A for...of loop gives you each array value directly. It is useful when you need the values but not their indexes.

Example

const colors = ["red", "blue"]; for (const color of colors) { console.log("Color:", color); }

Your task

Use for...of to visit every supplied ingredient and display three lines beginning with Ingredient:.