0
我有問題,這個小js不停止運行... 或者我說得好,他停下來,但不退出。Javascript does not stop running
function main(){
if(laenge<=1){
alert("exit");
return;}
var fs = require('fs');var i=0;
var all = fs.open('acc_all.txt', 'r');
var laenge = 25999;
while(!all.atEnd()){
var line = all.readLine();
console.log(line+" + "+laenge);
i++;laenge--;
}
all.close();
}
main();
它看起來像這樣... Console screen
when'!all.atEnd()'true?這就是問題:D! – Kai