using map to check for true or false doesn't work : <p>I am trying no to use a loop as Im practicing map, filter etc. and wonder why my code doesn't work? </p>

<pre><code>function checking(array,item){
 var temporary=true;
array.map(function(x){
if (x!=item){
    temporary=false;
}

});
return temporary;
}

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