Variables

👨‍💼 We need a way to store and reuse values in our programs. Variables let us give names to values so we can reference them later.
JavaScript has two main ways to declare variables:
  • const - for values that won't change (constants)
  • let - for values that might change later
🐨 Open and:
  1. Create a constant called greeting with the value "Hello"
  2. Create a variable called name with your name
  3. Log both values using console.log()
💰 Here's the syntax:
const myConstant = 'some value'
let myVariable = 'another value'

Please set the playground first

Loading "Variables"
Loading "Variables"
Login to get access to the exclusive discord channel.