Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain break statement in Ruby?



Explain break statement in Ruby?..

Answer / Gaurav Khare

The break statement in Ruby is used to exit a loop (such as while, until, or for) immediately. When the break statement is encountered within a loop, the loop terminates and execution continues with the next statement outside of the loop.n```rubynfor i in 1..5n if i == 3n break # exits the loop heren endnnputs i # this line will not be executed for i=3 because we broke out of the loop

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

what is a class library in Ruby?

1 Answers  


Explain ruby data types.

1 Answers  


Please explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


Explain the types of variables available in ruby class?

1 Answers  


Tell us the types of variables available in ruby class?

1 Answers  


Overview of ruby programming language?

1 Answers  


How do you remove nil values in array using ruby?

1 Answers  


Tell me how do you remove nil values in array using ruby?

1 Answers  


Explain while loop in ruby.

1 Answers  


In Ruby, it explains about the defined operator?

1 Answers  


What is ruby object?

1 Answers  


what is the purpose of the rakefile available in the demo directory in ruby?

1 Answers  


Categories