Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is my data structure
- var student = {
- name: 'Tom',
- address: {
- pincode: 43301,
- street: '12th Main',
- city: 'Some city',
- },
- marks: {
- sub1: 111,
- sub2: 222
- }
- }
- updatProperty(student, 'marks.sub1', 125) {
- // this method should return student object with marks.sub1 to be 125
- }
Add Comment
Please, Sign In to add comment