HomeTracks
Explorer···
THEEBUG
Completed0/6
Score0
JSlesson3.js×
THEEBUGlesson3.js
1
const fs = require("fs");
2
 
3
const contents = fs.readFileSync("notes.txt", ______);
4
console.log(contents);
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
4 blocks available
"utf8"
true
utf8
null
Game Panel
0:000 pts
Level 3 of 6Reading Files with fs
0/1 slots correct
Objective
Read notes.txt synchronously as a UTF-8 string
Expected Output
Buy milk
Debug says:
Without an encoding, fs.readFileSync returns a raw Buffer of bytes, not readable text. Which block tells it to decode the file as a UTF-8 string instead?
Debug the Worm