企业🤖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.