Code Room
Code reviewMediumcr-g608
Subject Storage checksumLevel Mid–Senior~20 minCommon in Storage & CDN interviewsIndustries Software development, Technology

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.

Talk through your review
Code to reviewjs
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.