Question about variable usage

Hi there, I was confused as to why in this video Rick chose to capitalize the variable StarDisplay. I had written it as starDisplay automatically and then confused myself when trying to call it in the if statement.
Thanks,
Nick

Hi,

Welcome to our community! :slight_smile:

That’s a very good question. I suspect that Rick accidentally wrote the variable name with a capital S because, according to most coding conventions, local variables are supposed to start with a minuscule letter. You definitely did not do anything wrong when you had your variable start with an “s” instead of an “S”.

Did this help?


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms