Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 562 Bytes

File metadata and controls

21 lines (14 loc) · 562 Bytes

Practice Problem 50

const people = [
    {name: 'Meena', age: 20},
    {name: 'Rina', age: 15},
    {name: 'Suchorita', age: 22}
];

  1. Challenging: Follow above array of objects. So, you have 3 objects as array element. Can you find out the total sum from here?

20 + 15 + 22 = 57 . The output will be 57

What are you thinking? Yeah! Do it with for loop. I know you can do it. But! Wait !! Wait !!! Do the same task using array.reduce() method.

problem provider : https://drive.google.com/file/d/1XcvIBe_rJlr6GY2rTnHlbIluTABXNhp7/view