Inventory Update - Help me with my code

How I intend my code to work is all explained in the code itself. So let’s focus on the problem. In the loop part only the index of the first item is being used with all quantities. In the current case, 67 is being added to all quantities values and that’s not what I want of course. The value 67 should be added only to 21, for example. My code isn’t complete yet because I need to make the loop to work properly.

function updateInventory(arr1, arr2) {
  
    // Create two different arrays to store curInv's quantity and name of the items.
 var cuQuantity = [];
 var cuItem = [];
    for (var i = 0; i<arr1.length;i++){
      cuQuantity.push(arr1[i][0]);
      cuItem.push(arr1[i][1]);
      
    }
  
  // Create two different arrays to store newInv's quantity and name of the items.
  var newQuantity = [];
  var newItem = [];
  for (var j = 0; j<arr2.length;j++){
    newQuantity.push(arr2[j][0]);
      newItem.push(arr2[j][1]);
  }
  
  var index = ""; // Temporary store the correspondent indexes of newItem in cuItem
  var cuQup = []; // Store all the updated quantities after the loop
  
  //Find all the correspondent indexes of newItem in cuItem
  for (var k = 0; k<newItem.length;k++){
    if (cuItem.indexOf(newItem[k] !== -1)){
    index = cuItem.indexOf(newItem[k]);
  //Update all the quantities and store them in cuQup    
    for (var l = 0; l<cuQuantity.length;l++){
   cuQuptemp = cuQuantity[l] + newQuantity[index];
      cuQup.push(cuQuptemp);
    }
    //If an item can't be found
    } else {
      cuItem.push(newItem[index]);
      cuQup.push(newQuantity[index]);
    }
  }
  
  // Join cuQup and cuItem in a single array
  var join = [];
 
}
// Example inventory lists
var curInv = [
    [21, "Bowling Ball"],
    [2, "Dirty Sock"],
    [1, "Hair Pin"],
    [5, "Microphone"]
];

var newInv = [
    [2, "Hair Pin"],
    [3, "Half-Eaten Apple"],
    [67, "Bowling Ball"],
    [7, "Toothpaste"]
];

updateInventory(curInv, newInv);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0.

Link to the challenge:
https://www.freecodecamp.org/challenges/inventory-update