Yes thanks for that Randell. Always love your input and appreciate it very much.
Anyways, this has got way more complicated than it should be. I managed to fix this but i got the feeling it can be so much more cleaner code than what i came up with. How can this be refactored/beautified?
const remove = (arr, elem) => {
let newArr = [];
for (let i = 0; i < arr.length; i++) {
let index = arr[i].indexOf(elem);
if (elem === arr[i][index]) {
arr[i].splice(index, 1);
}
newArr.push(arr[i]);
}
return newArr.filter(item => {
return !item.includes(elem);
});
};
const arr = [[3, 4, 5, 6], [6, 7, 8], [9, 0, 6]];
console.log(remove(arr, 6));