30-Days-Of-JavaScript
30-Days-Of-JavaScript copied to clipboard
Day 11 Exercise Level 3 4th question
How to add new property in Nested Array of Object using destructuring. Help me with this problem.
can you please explain me little bit more about your problem. so i can help you?
There is a key called "skills" and inside that an array called "frontend" inside that array how to add key value pair inside array by creating new object by using only destructuring ,in that problem he added new "skill" and "level" as key value pair , is there any syntax to add what I have mentioned using destructuring or not ?
Hello Chin,
You can try something like:
let addSkill = student.skills.frontEnd.push({skill: 'BootStrap', level: 8})
This way you can push any objects into an array.
Hope it helps!