摘抄自 “犀牛书” (之前挑重点看的,这下不小心翻到了这个,看来有时间还是得从头到尾过一遍,吼吼)
Only break
and continue
can use identifier statement in javascript.
var count = 0;
colintest: while(count < 15)
{
count++;
if(count % 2 === 0)
continue colintest;
console.log(count);
if(count === 13)
break colintest;
}
时间: 2024-09-30 00:42:49