// Practice Set · JS Debugging · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: Debug Intro

What does this log?

let a = 5;
let b = "5";
console.log(a + b, typeof (a + b), a + Number(b));
Question 2 of 5 from: Debug Console

let stock = 5; then console.assert(stock >= 0, "stock should never be negative"); runs. What does it print?

Question 3 of 5 from: Debug Errors

What does this log?

let user;
console.log(user?.name ?? "Guest");
Question 4 of 5 from: Debug Errors

What does this log?

console.log(typeof ("abc" * 5), "abc" * 5);
Question 5 of 5 from: Debug Async

What does this log, in order?

const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
async function run() {
  console.log("waiting...");
  await wait(100);
  console.log("done");
}
run();
console.log("returned");
Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.