I think this shorthand:
let fruits = ['🍉', '🍊', '🍇', '🍎']; // Using forEach method fruits.forEach(function(fruit){ console.log( fruit ); }); //=> 🍉 //=> 🍊 //=> 🍇 //=> 🍎
If you are logging it can be simplified like this:
let fruits = ['🍉', '🍊', '🍇', '🍎']; // Using forEach method fruits.map(fruit => console.log(fruit)) //=> 🍉 //=> 🍊 //=> 🍇 //=> 🍎
Thanks for your feedback. ❤️
I have already mentioned that shorthand in the "7. Arrow Functions" section. I hope that is fine.
Happy Coding!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think this shorthand:
If you are logging it can be simplified like this:
Thanks for your feedback. ❤️
I have already mentioned that shorthand in the "7. Arrow Functions" section. I hope that is fine.
Happy Coding!