Variables & Data Types
JavaScript Fundamentals • 12 pts
Variables: Storing Data
Variables are containers for storing data. In JavaScript, we use const, let, and var to declare variables. Think of them as labeled boxes that hold values.
Use const for values that won't change (constants), and let for values that will change. Avoid var - it's outdated and has confusing behavior.
JavaScript Data Types
JavaScript has several data types: String (text), Number (integers and decimals), Boolean (true/false), undefined, null, Object, and Symbol.
Output: — • expect number
What does typeof return for the number 42?
Select an answer
Remember: Use const by default. Only use let when you need to reassign a variable.