Created
January 24, 2023 08:20
-
-
Save Prosen-Ghosh/cabfc0ef28404aa376dbce59fa7bca33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const users = [ | |
{ name: "Alice", age: 25 }, | |
{ name: "Bob", age: 30 }, | |
{ name: "Charlie", age: 35 } | |
]; | |
const names = users.map(user => user.name); | |
console.log(names); | |
// Output: ["Alice", "Bob", "Charlie"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment