HomeTracks
Explorer···
THEEBUG
Completed0/6
Score0
JSlesson5.js×
THEEBUGlesson5.js
1
const fs = require("fs/promises");
2
 
3
async function loadNotes() {
4
const contents = ______ fs.readFile("notes.txt", "utf8");
5
console.log(contents);
6
}
7
 
8
loadNotes();
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
4 blocks available
await
async
yield
return
Game Panel
0:000 pts
Level 5 of 6Async/Await with fs.promises
0/1 slots correct
Objective
Await the promise-based readFile so the function pauses until the read completes
Expected Output
Buy milk
Debug says:
fs.readFile from fs/promises returns a Promise, not the file contents directly. Which keyword pauses the function until that promise resolves, giving you the real value?
Debug the Worm