Community Question Bundle

What I Ask Juniors Before Extending an Offer

The four questions I lean on when I am the last interviewer for a junior loop. They are not trick questions: each one tells me whether the candidate has actually built something or only studied for the interview.

What I Ask Juniors Before Extending an Offer

The four questions I lean on when I am the last interviewer for a junior loop. They are not trick questions: each one tells me whether the candidate has actually built something or only studied for the interview.

Question Bundle
JavaScript
4 questions
junior
interview-prep
react
coding-interview
hanaokoro

By @hanaokoro

November 25, 2025

·

Updated May 20, 2026

277 views

6

Rate

Given an array of { id, name } objects, return a Map keyed by id with the object as the value. I am watching for: do they reach for the right tool, do they handle duplicate ids honestly, and can they tell me the runtime?

Quick check

Quick check: indexById([{ id: 'a', name: 'Alice' }, { id: 'b', name: 'Bob' }]) returns Map { 'a' => { id: 'a', name: 'Alice' }, 'b' => { id: 'b', name: 'Bob' } }. On duplicates, indexById([{ id: 'a', name: 'A1' }, { id: 'a', name: 'A2' }]) returns Map { 'a' => { id: 'a', name: 'A2' } } under last-write-wins. The candidate I want flags that convention out loud.