Variables in Ruby

mariel on December 22, 2019

A couple of brief notes on Ruby variables: Variables are set with an = sign and can be reassigned at any time. They are named with snake_case ins... [Read Full]
markdown guide

Why is

ifDog_is_waffles = “Good Boy”



Hi Rashmin, looking back on this, you're right that it's not technically invalid - I think at the time I was trying to illustrate using reserved words in variable names, like "if". To be truly invalid, I'd need to try and assign a reserved word itself (e.g. if = "waffles"), but the example I gave is still a really poor naming choice. I'll make a note to update my post so it's more clear. Thank you!

code of conduct - report abuse