title: Javascript forEach() skips items
body: <p>I am new to javascript. Simply i want to remove all objects with completed: true.</p>
  
  <p>But my function doesn't do that. What am i missing ?</p>
  
  <pre><code>const todo = [{
      title: 'do this',
      completed: true
  },{
      title: 'do this',
      completed: true
  },{
      title: 'do this',
      completed: true
  },{
      title: 'do this',
      completed: true
  }]
  
  const remove = function(todo){
      todo.forEach(function(item,index){      
  
          if(item.completed){            
              todo.splice(index,1)        
          }
      })
  
  }
  
  remove(todo)
  console.log(todo)
  </code></pre>