continue 用在while语句中,陷入了死循环,是为什么?for就没问题
var num = 1; while(num<=6){ document.write("取出第"+ num +"个球"+"<br/>"); if(num==5){ //break;//退出循环 continue; } num++; }
var num = 1; while(num<=6){ document.write("取出第"+ num +"个球"+"<br/>"); if(num==5){ //break;//退出循环 continue; } num++; }
2017-12-24
举报