Flattening array in Javascript
I would think that this might be a problem best solved via recursion.

For example:

function flattenArray(arr) {
    var result = [];

    arr.forEach(function($val) {
        if(Array.isArray($val)) {
            result = result.concat(flattenArray($val));
        } else {
            result.push($val);
        }
    });

    return result;
}


Also consider a more meaningful name for your function like flattenArray vs. steamrollArray.  This better conveys what the function does.  Look at your question title for example. You used Flattening array to describe your code not Steamrolling array.