Question: Ruby on Rails It is OK to use assignment in a conditional test. Assuming x = 0 already, the following two conditional expressions produce the
Ruby on Rails
It is OK to use assignment in a conditional test. Assuming x = 0 already, the following two conditional expressions produce the same outcome:
if x = 0 puts CIS199; end
if x == 0 puts CIS199; end
| True |
| False |
When comparing two strings, string1 and string2, with ==, the following statement compares both strings character by character:
string1 == string2
| True |
| False |
It is syntactically correct to have a case statement without a test expression such as the following
case when x == y puts CIS199" end
| True |
| False |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
