Code Room
Code reviewMedium
Question
Review this Node download-and-extract routine.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
const fs = require("fs");const https = require("https"); async function fetchArtifact(url, expectedSha, dest) { await new Promise((resolve, reject) => { const file = fs.createWriteStream(dest); https.get(url, (res) => { res.pipe(file); file.on("finish", () => file.close(resolve)); }).on("error", reject); }); // artifact is now on disk; install it return installPackage(dest);}Run or narrate your approach, then ask the coach.