EduFlow
JavaScript Fundamentals

Checkpoint: First Steps

Five questions on this section. Answer all of them, then see your score and why each answer is right or wrong.

Question 1 of 5

What does this log?

JavaScript
let total = "0";
total = total + 450;
total = total + 1220;
console.log(total);
Question 2 of 5

const count = 0; followed later by count++; throws TypeError: Assignment to constant variable. What is the right fix?

Question 3 of 5

A checkout shows “Total does not match” because subtotal === 0.3 is false after adding 0.1 and 0.2. What is the best fix for a money app?

Question 4 of 5

What does this log?

JavaScript
const label = "  Rent ";
const clean = label.trim().toLowerCase();
console.log(label.length, clean);
Question 5 of 5

With const cents = 1250; and const item = "lunch";, which expression produces exactly Spent $12.50 on lunch?

5 questions unanswered