Skip to content
Advertisement

Accumulate value by types in objects [closed]

I have an array containing objects for each object has a different type (wall type). I am trying to accumulate the total value for each area in order to check the total area for each wall:

JavaScript

Advertisement

Answer

Iterate through it and update a result object:

JavaScript

JavaScript
Advertisement