[Solved] Update javascript array


If you want to access the topmost array, you can push or popor a number of other native array methods. You can access the inner arrays by index (array[0] for example), and then use regular array methods on the inner arrays. You can read more about arrays and their methods here

To answer your two examples, to add a new array, you’d array.push(newArray) where newArray is the array you wanted to insert, ["C1", "C2", "C3"], if you wanted to update the second line, you could access it by index array[1] and set it equal to a new value, array[1] = ["Z1" , "Z2", "Z3"]

1

solved Update javascript array