Challenge - 5 Problems
Deno REPL Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of variable reassignment in Deno REPL
What will be the output after running these lines in the Deno REPL?
Deno
let count = 5; count = count + 3; console.log(count);
Attempts:
2 left
💡 Hint
Remember that variables declared with let can be reassigned.
✗ Incorrect
The variable 'count' starts at 5, then 3 is added, so the output is 8.
❓ component_behavior
intermediateBehavior of top-level await in Deno REPL
What will the Deno REPL output after running this code snippet?
Deno
const result = await Promise.resolve('done'); console.log(result);
Attempts:
2 left
💡 Hint
Deno REPL supports top-level await by default.
✗ Incorrect
Deno REPL allows top-level await, so the promise resolves and logs 'done'.
📝 Syntax
advancedIdentify the syntax error in Deno REPL code
Which option contains a syntax error when entered in the Deno REPL?
Attempts:
2 left
💡 Hint
Look for missing closing brackets or parentheses.
✗ Incorrect
Option C is missing the closing bracket for the array, causing a syntax error.
🔧 Debug
advancedWhy does this Deno REPL code throw a ReferenceError?
Given this code in Deno REPL, why does it throw a ReferenceError?
Deno
console.log(value);
let value = 10;Attempts:
2 left
💡 Hint
Think about variable hoisting and temporal dead zone.
✗ Incorrect
Variables declared with let are not initialized before their declaration line, so accessing them earlier causes ReferenceError.
🧠 Conceptual
expertUnderstanding module import behavior in Deno REPL
What happens when you run this import statement in the Deno REPL?
Deno
import { serve } from "https://deno.land/std@0.177.0/http/server.ts"; console.log(typeof serve);
Attempts:
2 left
💡 Hint
Deno REPL supports ES module imports with top-level await.
✗ Incorrect
Deno REPL supports ES module imports, so serve is imported and is a function.
