Using the Map Method: Part 2 of 3
AboutCommentsNotes
Using the Map Method: Part 2 of 3
Expand for more info
index.js
run
preview
console
let arr = [3, 4, 5, 6]

// let modifiedArray = arr.map(function(element){
// return element * 3
// })

/*

Task

Use the map method to create a new array
called userFullNames that contains all of the users'
full names. The results should look like this:
["Susan Steward", "Daniel Longbottom", "Jacob Black"]

*/

let users = [
{firstName : "Susan", lastName: "Steward"},
{firstName : "Daniel", lastName: "Longbottom"},
{firstName : "Jacob", lastName: "Black"}
];






/*

Challenge:

Use the map method to create a new array
called userEmails that creates gmail addresses
for each of the users in the users array. The
results should look like this:

["SusanSteward@smallcompany.com",
"DanielLongbottom@smallcompany.com",
"JacobBlack@smallcompany.com"]

For bonus points, render the email addresses in all
lowercase letters, like this:

["susansteward@smallcompany.com",
"daniellongbottom@smallcompany.com",
"jacobblack@smallcompany.com"]

*/

Console
/index.html
-9:44