JavaScript Beginner

Values, Variables and Types

Programs are recipes that transform values. JavaScript stores values in variables and gives each a type that determines what you can do with it.

Key Concepts

  • Declare with const (unchanging binding, use by default) and let (reassignable); avoid old var
  • Core types: number (42, 3.14), string ('hello'), boolean (true/false), undefined, null
  • Template literals embed values in text: `Score: ${points}`
  • typeof reveals a value's type when debugging
  • The browser console (F12) is your laboratory — experiment constantly

Try It Yourself

Open the browser console and create const/let variables for your name, age and student status. Print a template-literal sentence combining all three.