Let's review how to declare them the right way🤔
There are a few general rules for naming variables:
▪️Variable names cannot start with numbers.
▪️Variable names are case sensitive, so myName and myname would be different variables. It is bad practice to create two variables that have the same name using different cases.
▪️Variable names cannot be the same as keywords. For a comprehensive list of keywords check out MDN’s keyword documentation.
I leave you this infographics slides, with code snippets 👇
There you go! If you have questions or you find it useful, please let me know in the comments!
Find me on:
🔗 Instagram | 🔗 Twitter | 🔗Github | 🔗linkedIn
Top comments (0)