如何做一个返回
语句从破发
语句的不同?
如果我必须退出一个if条件,其中一个我应该preFER,返回
或破发
?
How does a return
statement differ from break
statement?.
If I have to exit an if condition, which one should I prefer, return
or break
?
突破被使用,而返回用于回它被称为或步骤停止进一步执行。
break is used when you want to exit from loop, while return is used to go back to the step where it was called or to stop further execution.