1let numbers = [1, 2, 3, 4]
2let filteredNumbers = numbers.map(function(num, index) {
3 if (index < 3) {
4 return num
5 }
6})
7// index goes from 0, so the filterNumbers are 1,2,3 and undefined.
8// filteredNumbers is [1, 2, 3, undefined]
9// numbers is still [1, 2, 3, 4]
10
11