function range(start, end)
{
    if (arguments.length == 1) {
        var end = start;
        start = 0;
    }

    var r = [];
    if (start < end) {
        while (start != end)
            r.push(start++);
    }
    else {
        while (start != end)
            r.push(start--);
    }
    return r;
}
function range(start, end)
{
    if (arguments.length == 1) {
        var end = start;
        start = 0;
    }

    var r = [];
    if (start < end) {
        while (start != end)
            r.push(start++);
    }
    else {
        while (start != end)
            r.push(start--);
    }
    return r;
}
function range ( start , end ) { if ( arguments . length == 1 ) { var end = start ; start = 0 ; } var r = [ ] ; if ( start < end ) { while ( start != end ) r . push ( start ++ ) ; } else { while ( start != end ) r . push ( start -- ) ; } return r ; }
Emulates python's range() built-in. Returns an array of integers, counting
up (or down) from start to end. Note that the range returned is up to, but
NOT INCLUDING, end.
.
@param start  integer from which to start counting. If the end parameter is
not provided, this value is considered the end and start will
be zero.
@param end    integer to which to count. If omitted, the function will count
up from zero to the value of the start parameter. Note that
the array returned will count up to but will not include this
value.
@return       an array of consecutive integers.
Emulates python s range () built - in . Returns an array of integers counting up ( or down ) from start to end . Note that the range returned is up to but NOT INCLUDING end . .
returns an array of the ids of the terms