break、continue以及return

break:终止本轮循环,且只能终止当前一层循环,外层循环不影响
continue:结束本次循环,直接进入下一次循环
return:跳出所有循环;

你可能感兴趣的:(break、continue以及return)