Tell us what’s happening:
I am just trying to review concepts so that I can learn to understand javascript. This is an isolated example compared to my other question about for loops, as I was suggested to review the material.Maybe I’ll even do the javascript section again.
I want to return to free code camp once I review the basics to test my knowledge.
Your code so far
Here are the two methods
fruits.forEach(function(ChosenFruit){
console.log(' I want to eat a ' + ChosenFruit);
});
fruits.forEach(fruit => console.log('I want to eat a ' + fruit)); ///is the parameter fruit?
fruits.forEach(function(ChosenFruit){ //the paramater is ChosenFruit here?
console.log(' I want to eat a ' + ChosenFruit);
});
///potentially lacks a closing curly brackets
// Only change code below this line.
fruits.forEach(fruit => console.log('I want to eat a ' + fruit))
fruits.forEach(function(ChosenFruit){ //the paramater is ChosenFruit here?
console.log(' I want to eat a ' + ChosenFruit);
///potentially lacks a closing curly brackets
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/declare-javascript-objects-as-variables