var numbers = []; |
function begin() { |
for ( var i = 0; i < 100000; i++) { |
numbers.push(Math.random()); |
} |
if (numbers.length < 10000000) { // 是否已完成 |
setTimeout(begin, 0); |
} else { |
alert( "complete" ); |
} |
} |
begin(); |