I have a code in JavaScript and i would like to append "i" to each item of the array inside the object. here is the code. Could anyone go through it and fix this code
const forArray = [
{
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"]
},
];
const itemsArray = [];
forArray.forEach(item => {
let{items} = item;
items = items + "i";
itemsArray.push(items);
})
console.log(itemsArray);