0

I am having trouble removing an object from a 2D array. The object I am trying to remove is also an array.

var symbolsArray=[
   ["a","b","c","d"],
   [1,2,3,4,5],
   ["č","ž","š"],       // remove this whole array only
   ["1","2","3","4"]
]

I have been trying to remove it using slice, when it did not work also with splice. What is happening is that the first level array becomes empty after the operation or it has only one object inside it left.

I looked up SLICE and SPLICE methods and thought that slice is the way to go in my case. When it didnt work, I also tryes splice.

Is it maybe a problem beacuse I am trying to use it on a "multidimensional" array?

user2375263
  • 145
  • 1
  • 3
  • 13

0 Answers0