How to exit an if clause

前端 未结 13 1721
故里飘歌
故里飘歌 2020-12-04 08:45

What sorts of methods exist for prematurely exiting an if clause?

There are times when I\'m writing code and want to put a break statement

相关标签:
13条回答
  • 2020-12-04 09:13

    use return in the if condition will returns you out from the function, so that you can use return to break the the if condition.

    0 讨论(0)
提交回复
热议问题