var start = 400 - 1, arrayLength = 10, max = start + arrayLength, result = []; while (start <= max) result.push(start += 1); alert(result);