+ 1
Please tell me what is the difference between end and break?
3 Answers
+ 2
Depends on the language, but take Ruby for example. In Ruby, the break keyword is used between switch cases and to break out of a loop prematurely. End is used as another way of writing curly braces essentially, marking the end of a block of code. They have very different uses in Ruby but again this depends on the language.
0
i need for c++ language
0
@Lauren, break runs the same way in a majority of languages, end terminates run at the call point.