Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What's the difference between return and break?

Asked by 4 years ago

What's the difference between return and break other than return obviously returning a value??

1 answer

Log in to vote
1
Answered by 4 years ago

return is for exiting a function, optionally with values. break is for exiting a loop (while, for, repeat).

0
Don't forget that it can also be for exiting a script, too. hiimgoodpack 2009 — 4y
Ad

Answer this question