Guest practice: this set is not saved and does not count.
What does this log?
try { JSON.parse("{bad json}"); } catch (e) { console.log(e.name, e instanceof SyntaxError); }
let result = "Not Active."; let isActive = false; if (isActive = true) { result = "Active!"; } console.log(result, isActive);
const d = new Date(2026, 1, 30); console.log(d.getMonth() + 1, d.getDate(), String(new Date("2026-13-45")));
Error
NaN
try { throw "Too big"; } catch (error) { console.log(typeof error, error.message); } try { throw new Error("Too big"); } catch (error) { console.log(typeof error, error.message); }
string undefined
object Too big
string Too big
function loadSettings(text) { try { return JSON.parse(text); } catch (err) { throw new Error("Could not load settings", { cause: err }); } } try { loadSettings("{oops"); } catch (err) { console.log(err.message); console.log(err.cause.name); }
Could not load settings
SyntaxError
Unexpected token
undefined
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.
Check my answers