I don't really understand the inventory update challenge

I don't really understand the inventory update challenge
0

#1

What exactly is I’m suppose to do in the inventory challenge. I think is kind of open ended and lacks more information. Unless, it is designed that way for user to figure out the rest. I have 2 arrays and I have to update one with the other. What is exactly the condition which I need to update one with the other. If someone can explain what is the intended result / output / return of the function.


Thanks


#2

The FCC test cases will call your function with two arrays. The first function argument will contain the current inventory. The second argument will contain an array which represents a new delivery of items to add to the existing inventory. If the item in the second array (arr2) already exists in the current inventory (arr1), then just update the quantity. If the item in the second array (arr2) does not exist in the current inventory (arr1), then you will need to add the new item name and quantity as a subarray. Also, you will need to make sure the final two dimensional array is sorted by item name.


#3

got it… thanks a lot