javascript - Remove certain values in multidimensional array -


i have array

arr = [ [1,2,3], [4,5,6], [7,8,9] ] 

i want remove array contains element 4. here remove 4,5,6. it'd arr = [[1,2,3],[7,8,9]];

i tried for loop 0. read remove items array splice in loop didn't work. removed first number instead.

arr.filter(function(v) {    return !v.includes(4); }); 

Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -