Challenge 1 of 12
Create a string variable
Instructions
Create a variable named `name` and assign it the string `"Ada"`.
Editor
IntelliSense on
// Write your code below
Module 1 of 10
Declare variables, assign values, and use const, let, and typeof.
JavaScript Basics · 0/12 completed · scroll down for every challenge
Challenge 1 of 12
Create a variable named `name` and assign it the string `"Ada"`.
Editor
IntelliSense on
// Write your code below
Challenge 2 of 12 · Add two numbers
Challenge 2 of 12
Create variables `a` and `b` with values 12 and 30. Create `sum` with their total.
Editor
IntelliSense on
// Write your code below
Challenge 3 of 12 · Reassign with let
Challenge 3 of 12
Use `let` for `score`, start at 0, then set it to 100.
Editor
IntelliSense on
// Write your code below
Challenge 4 of 12 · Increment a counter
Challenge 4 of 12
Start `count` at 5 with `let`, then increment it by 1 using `++`.
Editor
IntelliSense on
// Write your code below
Challenge 5 of 12 · Combine strings
Challenge 5 of 12
Given `first` and `last`, create `fullName` as `"Ada Lovelace"` using `+`.
Editor
IntelliSense on
const first = "Ada"; const last = "Lovelace"; // Write your code below
Challenge 6 of 12 · Number variable
Challenge 6 of 12
Create `year` with the number 2026.
Editor
IntelliSense on
// Write your code below
Challenge 7 of 12 · Boolean variable
Challenge 7 of 12
Create `ready` with the boolean value `true`.
Editor
IntelliSense on
// Write your code below
Challenge 8 of 12 · typeof check
Challenge 8 of 12
Store `typeof "js"` in `kind`.
Editor
IntelliSense on
// Write your code below
Challenge 9 of 12 · Undefined value
Challenge 9 of 12
Create `pending` without assigning a value (use `let`).
Editor
IntelliSense on
// Write your code below
Challenge 10 of 12 · Null value
Challenge 10 of 12
Create `empty` and set it to `null`.
Editor
IntelliSense on
// Write your code below
Challenge 11 of 12 · Swap with a temp
Challenge 11 of 12
Swap `left` and `right` using a temporary variable.
Editor
IntelliSense on
let left = 3; let right = 9; // Write your code below
Challenge 12 of 12 · Template from parts
Challenge 12 of 12
Build `label` as `"JS-101"` from `lang` and `code` using a template literal.
Editor
IntelliSense on
const lang = "JS"; const code = 101; // Write your code below
Next module