function eitherFilter(array, callback1, callback2) {
    // ADD CODE HERE
    const res = [];
    for (let i = 0; i < array.length; i++) {
        if (callback1(array[i])) {
            res.push(array[i]);
        } else if (callback2(array[i])) {
            res.push(array[i]);
        }
    }
    return res;
}
/*
Challenge: eitherFilter

Add code to the function eitherFilter in the place marked "ADD CODE HERE" in order to achieve the desired console logs.
The array returned from eitherFilter should contain all elements in the passed-in array that yield a truthy return value
when passed into EITHER of the two callbacks passed into eitherFilter.
 */
eitherFilter
Add code to the function eitherFilter in the place marked "ADD CODE HERE" in order to achieve the desired console logs.
The array returned from eitherFilter should contain all elements in the passed-in array that yield a truthy return value
when passed into EITHER of the two callbacks passed into eitherFilter.
eitherFilter Add code to the function eitherFilter in the place marked " ADD CODE HERE " in order to achieve the desired console logs . The array returned from eitherFilter should contain all elements in the passed - in array that yield a truthy return value when passed into EITHER of the two callbacks passed into eitherFilter .
function eitherFilter(array, callback1, callback2) {
    const res = [];
    for (let i = 0; i < array.length; i++) {
        if (callback1(array[i])) {
            res.push(array[i]);
        } else if (callback2(array[i])) {
            res.push(array[i]);
        }
    }
    return res;
}
function eitherFilter ( array , callback1 , callback2 ) { const res = [ ] ; for ( let i = 0 ; i < array . length ; i ++ ) { if ( callback1 ( array [ i ] ) ) { res . push ( array [ i ] ) ; } else if ( callback2 ( array [ i ] ) ) { res . push ( array [ i ] ) ; } } return res ; }
Challenge: eitherFilter
Add code to the function eitherFilter in the place marked "ADD CODE HERE" in order to achieve the desired console logs.
Challenge : eitherFilter Add code to the function eitherFilter in the place marked " ADD CODE HERE " in order to achieve the desired console logs .
// ADD CODE HERE