V
Q. What will be the output of the given code?
counter = true while counter !=false puts counter end
Counter value is true in all cases hence true will be printed infinite times.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. How do you read the entire contents of a file into a string in Ruby?
Q. What is the output of the given code? counter = 1 until counter > 10 puts counter counter+=1 end
Q. In Ruby, what does the `singleton_method_defined?` method do?
Q. What does the def keyword signify in Ruby?
Q. Which statement will execute at the end of the code, whether the exception raise or not?
Q. What is the output of the given code? a=[["a","b"]] b=[["e","a"]] print a + b
Q. What will be output for the following code When input number is ""!""?
Q. What is the correct syntax for defining a variable in Ruby?
Discusssion
Login to discuss.