Variables

I was watching the Lecture 46 on FStrings, and just giving my personal thoughts on the matter of writing variables. I have always taught to have variables written with the first letter lower case, and then ever new word after that being an upper case. for example “playerCharacterHealth” or “waterBottle”. i know its entirely preference but in this lecture when i heard, “you should always start a variable with an upper case” i was like “aaaaaah! no no xD i must not!” as i always start my functions with upper case haha

2 Likes

Haha yeah my teacher in school does it with lower case. It just depends on the convention your company uses or personal taste. The two types are PascalCase and then camelCase. You were taught camelCase.

Privacy & Terms