Iterate and mutate an array using Array.prototype.splice
var pre = document.getElementById(‘out’); function log(result) { pre.appendChild(document.createTextNode(result + ‘\n’)); } var review = [‘a’, ‘b’, ‘c’, ‘b’, ‘a’]; review.forEach(function(item, index, object) { if (item === ‘a’) { object.splice(index, 1); } }); log(review);
<pre id="out"></pre>