You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In JS easy question 2 expenditure analysis, it requires a specific property name for the total amount in output object that is 'totalSpent' but the question doesn't hint it, if you make the entire program right and name the property something else it yields error and all test cases are passed on using the name 'totalSpent' in the output price but this isn't mentioned in question which tells to use 'total_amount_spent'
The text was updated successfully, but these errors were encountered:
Also, I feel the description of the question is not clear. After reading the description, I comprehended that the output list should be of the following form for this particular example (after seeing the line-> Output - [{ category1 - total_amount_spent_on_category1 }, { category2 - total_amount_spent_on_category2 }]) :
Ex: Input:
{
id: 1,
timestamp: 1656076800000,
price: 10,
category: 'Food',
itemName: 'Pizza',
},
{
id: 2,
timestamp: 1656259600000,
price: 20,
category: 'Food',
itemName: 'Burger',
},
{
id: 3,
timestamp: 1656019200000,
price: 15,
category: 'Clothing',
itemName: 'T-Shirt',
},
{
id: 4,
timestamp: 1656364800000,
price: 30,
category: 'Electronics',
itemName: 'Headphones',
},
{
id: 5,
timestamp: 1656105600000,
price: 25,
category: 'Clothing',
itemName: 'Jeans',
},
In JS easy question 2 expenditure analysis, it requires a specific property name for the total amount in output object that is 'totalSpent' but the question doesn't hint it, if you make the entire program right and name the property something else it yields error and all test cases are passed on using the name 'totalSpent' in the output price but this isn't mentioned in question which tells to use 'total_amount_spent'
The text was updated successfully, but these errors were encountered: