DEV Community

[Comment from a deleted post]
Collapse
 
rdandekarslb profile image
Rashmin Dandekar

Why is

ifDog_is_waffles = “Good Boy”

invalid?

Collapse
 
mariel profile image
mariel

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!