/**
 * Array forEach
 */
function forEach(arr, callback, thisObj?: any) {
    if (arr == null) {
        return;
    }
    let i = -1;
    const len = arr.length;
    while (++i < len) {
        // we iterate over sparse items since there is no way to make it
        // work properly on IE 7-8. see #64
        if (callback.call(thisObj, arr[i], i, arr) === false) {
            break;
        }
    }
}

export default forEach;
