What is the correct way to declare and initialize a variable in Ruby?
A. var_name = value
B. var var_name = value
C. variable var_name = value
D. variable_name = value
Answer: Option D
A. var_name = value
B. var var_name = value
C. variable var_name = value
D. variable_name = value
Answer: Option D
What does the 'puts' method do in Ruby?
A. Prints to console
B. Converts to string
C. Finds the length
D. Reads input from user
Join The Discussion