Home / Programming MCQs / Ruby MCQs / Question
V
Q. Guess the operator : If Condition is true ? Then value X : Otherwise value Y?
Explanation:
first evaluates an expression for a true or false value and then Ternary Operator executes one of the two given statements depending upon the result of the evaluation
You must be Logged in to update hint/solution
How do you check the truthiness of a value in Ruby?
In Ruby, which keyword is used to define a class method?
What does the pop method do when called on an array in Ruby?
What is true about Until loop?
Which of the following is the correct way to declare a constant in Ruby?
In Ruby, how can you add a key-value pair to an existing hash?
What is the output of the given code? for num in 1..3 puts num for i in 1..2 puts num*i end end
Discusssion
Login to discuss.