Challenge 1 of 12
Remainder
Instructions
Store the remainder of 17 divided by 5 in `remainder`.
Editor
IntelliSense on
// Write your code below
Module 3 of 10
Use arithmetic, comparison, and nullish operators.
JavaScript Basics · 0/12 completed · scroll down for every challenge
Challenge 1 of 12
Store the remainder of 17 divided by 5 in `remainder`.
Editor
IntelliSense on
// Write your code below
Challenge 2 of 12 · Strict equality
Challenge 2 of 12
Set `same` to true when `a` and `b` are strictly equal.
Editor
IntelliSense on
const a = 5; const b = 5; // Write your code below
Challenge 3 of 12 · Loose vs strict
Challenge 3 of 12
Set `loose` using `==` and `strict` using `===` when comparing `5` and `"5"`.
Editor
IntelliSense on
const a = 5; const b = "5"; // Write your code below
Challenge 4 of 12 · Power operator
Challenge 4 of 12
Store 2 to the power of 8 in `result` using `**`.
Editor
IntelliSense on
// Write your code below
Challenge 5 of 12 · Compound assignment
Challenge 5 of 12
Start `total` at 10, then add 5 using `+=`.
Editor
IntelliSense on
// Write your code below
Challenge 6 of 12 · Multiply
Challenge 6 of 12
Store 7 times 6 in `product`.
Editor
IntelliSense on
// Write your code below
Challenge 7 of 12 · Integer division feel
Challenge 7 of 12
Store the integer result of `Math.floor(20 / 3)` in `whole`.
Editor
IntelliSense on
// Write your code below
Challenge 8 of 12 · Unary plus
Challenge 8 of 12
Convert `"42"` to a number with unary `+` and store it in `n`.
Editor
IntelliSense on
// Write your code below
Challenge 9 of 12 · Nullish coalescing
Challenge 9 of 12
Set `display` to `title` if it is not nullish, otherwise `"Untitled"`. `title` is `null`.
Editor
IntelliSense on
const title = null; // Write your code below
Challenge 10 of 12 · OR fallback
Challenge 10 of 12
Set `name` to `input || "guest"`. `input` is `""`.
Editor
IntelliSense on
const input = ""; // Write your code below
Challenge 11 of 12 · Decrement
Challenge 11 of 12
Start `lives` at 3 with `let`, then decrement with `--`.
Editor
IntelliSense on
// Write your code below
Challenge 12 of 12 · Greater or equal
Challenge 12 of 12
Set `pass` to true when `score` is at least 50. `score` is 50.
Editor
IntelliSense on
const score = 50; // Write your code below
Next module