const storage= [
{
id:1,
name:“kahnu”,
age:21,
phone:1234567890
},
{
id:2,
name:“kahnu2”,
age:22,
phone:1234567890
},
{
id:3,
name:“kahnu3”,
age:23,
phone:1234567890
}
]
const objIndex = storageData.findIndex((obj => obj.id == ‘1’));
storageData[objIndex].name = ‘new name’;
storageData[objIndex].email = ‘new email’;
storageData[objIndex].age = ‘new age’;
console.log(“After update: “, storageData[objIndex])