JavaScript Fundamentals I
Lesson Overview How do you declare a variable? What are three different ways to declare a variable? let myVariable const myConsistantVariable const PRIOR_TO_RUN_CODE_KNOWN_CONSISTANT_VARIABLE Which one should you use and when? use let for variables that may change in the future, use const for variables that won’t change
What are the rules for naming variables? camelCase for most, UPPER_CASE for “hard-coded” constants, be descriptive, avoid single letters, don’t start with a number, do not use hyphens ‘-’, can use ‘$’ and ‘_’