Quiz: A Type Error

TypeScript won't run this program: it reports a type error. Click the line with the mistake.

// Kira buys a potion
let gold = 120;
let potions = 2;
gold = gold - 30;
potions = "3";
console.log("Gold:", gold, "Potions:", potions);

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

5/9