Challenge 3 — Solution Task: Write a function riskyOperation(shouldFail) that throws a RangeError if shouldFail is true, otherwise returns "Success". Wrap a call in try/catch/finally: log the result or the error's name+message in catch, and always log "Operation complete" in finally, regardless of outcome. Call it twice, once with each boolean. function riskyOperation(shouldFail) { if (shouldFail) { throw new RangeError("Operation exceeded allowed range"); } return "Success"; } function runOperation(shouldFail) { try { const result = riskyOperation(shouldFail); console.log(result); } catch (error) { console.log(`${error.name}: ${error.message}`); } finally { console.log("Operation complete"); } } runOperation(false); runOperation(true); Expected output: Success Operation complete RangeError: Operation exceeded allowed range Operation complete Notes: - RangeError is one of JavaScript's built-in error types (alongside Error, TypeError, SyntaxError) — created the same way as a plain Error, just with a more specific name already set automatically. - finally runs after BOTH the successful call (runOperation(false)) and the failing one (runOperation(true)) — "Operation complete" appears in both cases, proving it isn't conditional on whether an error was thrown. - error.name here is "RangeError", not the generic "Error" — that distinction comes for free from using RangeError specifically instead of new Error(...).