const groceries = [‘brown sugar’, ‘salt’, ‘cranberries’, ‘walnuts’];
console.log(’ - ’ + groceryItem);
Two questions on this example from Iterators, Module 2:
Where is “groceryItem” defined?
Why does the function print out the list without having declared “groceryItem” anywhere?
If you press ctrl f or whatever brings up your find/search/thing and type groceryItem, then you’ll find two mentions of them, so if one of them uses it, then surely the other defines it
You might want to look up what forEach does.