Guest User

Untitled

a guest
May 27th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. This is my data structure
  2. var student = {
  3. name: 'Tom',
  4. address: {
  5. pincode: 43301,
  6. street: '12th Main',
  7. city: 'Some city',
  8. },
  9. marks: {
  10. sub1: 111,
  11. sub2: 222
  12. }
  13. }
  14.  
  15. updatProperty(student, 'marks.sub1', 125) {
  16. // this method should return student object with marks.sub1 to be 125
  17. }
Add Comment
Please, Sign In to add comment