Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Master Vue.js with Vue School Premium

$25 / month

Modern JavaScript: ES6 and beyond!

Get access to this course, 18 others, and future Vue.js courses!

Learn Array.forEach and Array.map in JavaScript

In this lesson, we'll learn how to use two new array helper methods that was introduced to JavaScript in ES6, namely the Array.forEach and Array.map functions.

The forEach method lets us execute a callback function on each array element.

The map method lets us create a new array with the results of calling a callback on every element in the array.