V
Q. What will be the output of the given code?
for num in 1...5 puts num end
As the range i.e 1...5 is exclusive the loop will loop till 4 and then it will come out of the loop.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. In Ruby, what does the `break` keyword do when used within nested loops?
Q. What is the purpose of a setup block in MiniTest?
Q. What is the correct way to define a symbol in Ruby?
Q. In Ruby, which method is used to convert a string to uppercase?
Q. What is the output of the given code? unless true && false print "false" else print "ruby" end
Q. What is the output of given code? string="I'am Learning RUBY Language".downcase string.upcase
Q. What is the recommended way to handle exceptions in Ruby?
Q. What is the output of the given code? counter = true while counter !=false puts counter end
Q. Which keyword is used to define a private method in a Ruby class?
Q. Which of the following is correct syntax to create an array in ruby?
Discusssion
Login to discuss.