I'm working on some codewars problems and I came to this 'remove noise thing', I guess the point is to escape backslash \ and use **replace** method, which was easy. But I didn't want to use **replace**, instead I found myself in trouble trying to remove items with **splice** method.

Funny thing is, when I debug in Chrome dev tools, step by step I see items get removed, but **console.log** spits out certain characters($/·|ªl) problematic to remove, and at the end gets returned and join with those characters. Why is that?

```js
function removeNoise(str) {
  var base = "%$&/#·@|º\ª";
  var arr = str.split('');

  for(var i = 0; i < arr.length; i++) {
    var item = arr[i];
    var condition = base.indexOf(item);
    if(condition + 1) {
      //works like a charm
      //arr[i] = '';

      arr.splice(i,1); 
      //this thing wont work
      //when debugging it removes the items from the array
      //console log print no removing
    }
  }
  return arr.join(''); 
}

removeNoise('he%$&/#·@|º\ª\llo'); //=> $/·|ªllo
```