Code Room
Code reviewHard
Question
Review this JavaScript that enforces a 10-'character' limit and reverses a string.
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
function validate(s) { if (s.length > 10) throw new Error('too long'); return s;} function reverse(s) { return s.split('').reverse().join('');} // validate("\uD83D\uDE00 hi"); reverse("a\uD83D\uDE00b");Run or narrate your approach, then ask the coach.