How to create a new list with all user information, but add "!" to the end of each items they own.I know to solve this with map. But i'm finding it hard as a beginner to do this with a for loop. Here is the code. I would really appreciate the help.
const array = [
{
username: "john",
team: "red",
score: 5,
items: ["ball", "book", "pen"]
},
{
username: "becky",
team: "blue",
score: 10,
items: ["tape", "backpack", "pen"]
},
{
username: "susy",
team: "red",
score: 55,
items: ["ball", "eraser", "pen"]
},
{
username: "tyson",
team: "green",
score: 1,
items: ["book", "pen"]
},
];