Code Room
Code reviewHard
Question
Review this Node.js code that parses newline-delimited JSON events off a TCP socket.
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
socket.on('data', (chunk) => { const line = chunk.toString('utf8').trim(); const event = JSON.parse(line); handle(event);});Run or narrate your approach, then ask the coach.