Back to Freecodecamp

Step 13

curriculum/challenges/english/blocks/workshop-logic-checker-app/690a3f884e083a6a33b81fcf.md

latest1.1 KB
Original Source

--description--

Finally, change the declaration of timmyAge and set it to a number less than 16. After that you'll see "Timmy is not old enough to drive." logged to the console.

--hints--

Your timmyAge variable should have a value less than 16.

js
assert.isAtMost(timmyAge, 15);

--seed--

--seed-contents--

js
const hasDeveloperJob = true;

if (hasDeveloperJob) {
  console.log("Timmy is employed as a developer.");
}

const isTimmyAGamer = false;

if (isTimmyAGamer) {
  console.log("Timmy loves to play World of Warcraft.");
}

--fcc-editable-region--
const timmyAge = 18;
--fcc-editable-region--

if (timmyAge >= 16) {
  console.log("Timmy is old enough to drive.");
} else {
  console.log("Timmy is not old enough to drive.");
}

--solutions--

js
const hasDeveloperJob = true;

if (hasDeveloperJob) {
  console.log("Timmy is employed as a developer.");
}

const isTimmyAGamer = false;

if (isTimmyAGamer) {
  console.log("Timmy loves to play World of Warcraft.");
}

const timmyAge = 15;

if (timmyAge >= 16) {
  console.log("Timmy is old enough to drive.");
} else {
  console.log("Timmy is not old enough to drive.");
}