Home / Programming MCQs / Ruby MCQs / Question

V

Vinay Kumar • 8.45K Points
Tutor III

Q. What is the use of break statement?

(A) Terminates the most External loop.
(B) Terminates all loop.
(C) Terminates the program.
(D) Terminates the most internal loop.

Explanation:

Terminates the most internal loop. Terminates a method with an associated block if called within the block (with the method returning nil).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.