Home / Programming MCQs / Ruby MCQs / Question
V
Q. What is the use of break statement?
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
What is the correct way to declare and initialize a variable in Ruby?
What is the purpose of polymorphism in Ruby?
What is the output of the given code? a=5 b=15 while a&&b puts a+b end
What is the purpose of the self keyword in Ruby?
What does the lambda keyword return in Ruby?
What is the output of the given code? for num in 1..5 puts num*num end
What is the purpose of a scenario outline in Cucumber testing?
Discusssion
Login to discuss.