check if two elements exist in array with older browser support
From a short look


foo is a terrible name


If this is not the real name, then please do submit the real code

arr seems to be a global, bad practice
You don't need current, you could just go for var id = arr[i].id; 
For older browsers, it is faster to cache arr.length instead of retrieving it every time
bar is a terrible name, I really hope you don't write production code like that
the call to bar should probably happen outside of that function


Given that, I would go for the below pseudo code:

function arrayHasBothObjects(list, id1, id2){
    var boolOne = false,
        boolTwo = false,
        size = list.length;

    for (var i = 0; i &lt; size; i++) {
        var id = list[i].id;

        boolOne = boolOne || id == id1;
        boolTwo = boolTwo || id == id2;

        if(boolOne &amp;&amp; boolTwo){
            return true;
        }
    }
    return false;
}