Q 34 - break, continue & return #39
Answered
by
AmjustGettingStarted
HARSHITH-MV
asked this question in
Q&A
-
What is the difference between break, continue, and return? |
Beta Was this translation helpful? Give feedback.
Answered by
AmjustGettingStarted
Jul 21, 2025
Replies: 1 comment
-
🔄
|
Keyword | Scope | Effect |
---|---|---|
break | Loops, switch | Exits the loop or switch block |
continue | Loops only | Skips current iteration |
return | Methods only | Exits method, optionally returns value |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
HARSHITH-MV
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔄
break
switch
block.⏩
continue
🔚
return