ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
continue关键字结束它所声明的最深处的当前迭代,使循环条件被检查于下一次迭代: > The continue keyword ends the current iteration of the innermost loop (for or while) it is declared in, causing the loop condition to be checked for the next iteration: ~~~ while(true) { expression1; if(condition) continue; expression2; } ~~~ 这里,expression1每次迭代都被执行,但是如果条件满足,expression2不再为当前迭代执行。不像break,迭代仍然继续。 > Here, expression1 is evaluatedfor each iteration, but if condition holds, expression2 is not evaluated for the current iteration. Unlike break, iterations continue. 类型工具确保它只出现在循环中。 > The typer ensures that it appears only within a loop.