OR condition in if statement not working propely
<pre><code>var answer1=arguments[0];
var value1=arguments[1];
var value2=arguments[2];
var finalAnswer=[];

console.log(answer1);
console.log(value1);
console.log(value2);

for (var i=0;i&lt;=answer1.length-1;i++ ){
    if (answer1[i]===value2 || answer1[i]===value1){
        finalAnswer= answer1.splice(i,1);
        finalAnswer.pop();
    }
}

console.log(answer1);
console.log(finalAnswer);

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
</code></pre>

<p>Hi I tried this Seek and Destroy Challenge ,which is Search for the argument objects given in the destroyer's argument and remove them.
But my if statement is not working properly. Its not checking for the or option. Its not checking for the comparison of "answer1[i]===value2" option at all.</p>

<p>The answer should be like:[1,1]
But I am getting answer:[1,3,1,3] .It is not removing 3.
Any suggestions why?</p>