var array = [["a", "b", "c", "d", "e", "f"],
["a", "b", "c", "d", "e", "f"],
["a", "b", "c", "d", "e", "f"]]
How can I delete the second column in this array?
var array = [["a", "b", "c", "d", "e", "f"],
["a", "b", "c", "d", "e", "f"],
["a", "b", "c", "d", "e", "f"]]
How can I delete the second column in this array?
You could specify the index and then iterate over the array and splice the inner arrays.
var array = [["a", "b", "c", "d", "e", "f"], ["a", "b", "c", "d", "e", "f"], ["a", "b", "c", "d", "e", "f"]],
index = 1;
array.forEach(a => a.splice(index, 1));
console.log(array);
.as-console-wrapper { max-height: 100% !important; top: 0; }