DEV Community

Cover image for JavaScript Variables!

JavaScript Variables!

Carlos Giner
Frontend dev. Always learning, enjoying the journey. Mechanical engineering graduate. Father and husband.
・1 min read

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

Discussion (0)