JavaScript标签
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript标签相关的知识,希望对你有一定的参考价值。
Just some pseudo-code notes about using labels with `break` and `continue` statements.
outer_loop: while(outer_condition) { //some statements while(inner_condition) { //some statements if(skip_the_rest_of_inner) continue; if(exit_inner_and_skip_the_rest_of_outer) continue outer_loop; if(exit_inner_loop) break; if(exit_outer_loop) break outer_loop; //statements to skip } //statements to skip } statements_block: { //some statements if(skip_remaining_statements) break statements_block; //statements to skip }
以上是关于JavaScript标签的主要内容,如果未能解决你的问题,请参考以下文章