Code Room
Code reviewHard
Question
Review this Node.js code that reads a 64-bit ID from a JSON API and echoes it back.
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
async function relayId(req, res) { const body = await req.json(); // { "id": 9007199254740993, ... } const id = body.id; const row = await db.query('SELECT * FROM events WHERE id = $1', [id]); res.json({ id, found: row.length > 0 });}Run or narrate your approach, then ask the coach.