Intro. to Ruby | 12. Naming Conventions (Passed the section, but error message)


var name = "Jordin"

undefined method `var' for #

It said that I passed the section, but I want to know why it gave me that error message. If you know, please tell me. Thanks!


There is no reserved word, var in Ruby. Variables are defined when they are instantiated.

name = "Jordin"

We cannot declare a variable without defining it like we can in JS.


Thanks for the help! :slightly_smiling: