From be3675fccce186c14abc33d63e0d6ccf70ec079d Mon Sep 17 00:00:00 2001 From: Lokeshwar Reddy Jonnalagadda <10lokeshnani@gmail.com> Date: Thu, 7 Dec 2023 16:58:33 +0530 Subject: [PATCH] Update expenditure-analysis.js --- 01-js/easy/expenditure-analysis.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/01-js/easy/expenditure-analysis.js b/01-js/easy/expenditure-analysis.js index ad26686344..09c4013040 100644 --- a/01-js/easy/expenditure-analysis.js +++ b/01-js/easy/expenditure-analysis.js @@ -3,13 +3,13 @@ and return a list of objects where each object is unique category-wise and has total price spent as its value. transactions is an array where each Transaction - an object like - { - id: 1, - timestamp: 1656076800000, - price: 10, - category: 'Food', - itemName: 'Pizza', - } + { + id: 1, + timestamp: 1656076800000, + price: 10, + category: 'Food', + itemName: 'Pizza', + } Output - [{ category: 'Food', totalSpent: 10 }] // Can have multiple categories, only one example is mentioned here */