fork download
  1. function removeArray(arr, value) {
  2. return JSON.parse(JSON.stringify(arr).replace(new RegExp(`${JSON.stringify(value).replace(/(\]|\[)/g, s => `\\${s}`)},?`, 'g'), ''));
  3. }
  4.  
  5. const x = [ [1,2], [3,4], [5,6] ];
  6. const x1 = removeArray(x, [3,4])
  7. console.log(x1);
Success #stdin #stdout 0.04s 16788KB
stdin
Standard input is empty
stdout
1,2,5,6