Q. Which of the following is the correct way to declare a variable in Ruby with a default value?

  • (A) var_name = value
  • (B) var_name := value
  • (C) var_name << value
  • (D) var_name => value
πŸ’¬ Discuss
βœ… Correct Answer: (A) var_name = value

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
142
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate