const names = ["alice", "bob", "charlie", "danielle"]; const namesCap = names.map((name) => { return `${name[0].toUpperCase()}${name.slice(1)}`; }); console.log(namesCap);