Skip to main content

Junior

A junior answer names the rule and the bug it prevents.

What is the difference between == and ===?

=== compares without coercion. == coerces, so values of different types can match. Prefer ===. The comparison value == null is the common exception: it is true for both null and undefined, and false for other values.

What is the difference between var, let, and const?

var is function-scoped and can be read before its line, where the value is undefined. let and const are block-scoped and cannot be read before their line. const prevents a new assignment to the binding. It does not freeze the object the binding points at.

What is a closure, and how does it surprise people in a loop?

A closure is a function that keeps the bindings from the scope where it was created, after that scope returns. A loop that uses var shares one binding, so every callback sees the final value. let creates a binding per iteration.

Where does this come from in a regular function and in an arrow function?

A regular function gets this from the call. Calling it as a method sets this to that object. Calling that function with no receiver does not. An arrow function takes this from the surrounding scope and does not get a new one at the call.

In what order do a resolved promise and a setTimeout of 0 run?

After the current stack, the engine drains microtasks, including promise reactions, before the next task. A setTimeout of 0 is a task. A promise resolved now runs its callback before that timer.

What does TypeScript check, and what still has to be checked at runtime?

TypeScript checks types it can see at compile time and erases them from the emitted JavaScript. Data from outside the program, including JSON from the network, is not checked by the compiler. Validate that data at the boundary.

Mid

A mid-level answer names the mechanism and a failure mode.

What does structural typing accept, and where do excess property checks apply?

A value is accepted when it has the required members, even if it was not declared with that type's name. A fresh object literal is also checked for extra properties. A value that has already been assigned to a wider type is not subject to that extra check. A nominal type needs a brand.

When do you choose an interface, and when a type alias?

Both can name an object shape. An interface can be reopened and merged by a later declaration. A type alias can name a union, an intersection, a mapped type, or a conditional type. Use a type alias when the form is one of those.

How do you type a function that narrows its input?

A type predicate, written as value is SomeType, tells the checker the narrowed type after a true result. The function has to actually perform that check. The predicate is a claim, not a proof. A generic that returns its input type preserves a more specific caller type when you return the same value.

What goes wrong if request data is stored on a module-level object?

A module is evaluated once for the process or the page. An object in that scope is shared by every caller. Writing one request's data onto it leaks into the next request. Keep that data on the request, or in a variable that lives only for that call.

When do you use Promise.all, and when Promise.allSettled?

Promise.all rejects when one input rejects. The other inputs keep running, and their results are not on the rejection. Promise.allSettled waits for every input and returns a fulfilled or rejected entry for each. Use allSettled when a partial failure is a result you need to report.

What does unknown force the caller to do that any does not?

A value of type unknown cannot be read until it is narrowed. any turns checking off for that value and for what it flows into. At a boundary, accept unknown and check it before use.

Senior

A senior answer names the tradeoff, the failure, and what to measure.

How do you model a value that can be in only one of several states?

Give each variant a literal tag and only the fields that variant uses. Switch on the tag. A default arm that expects never fails the build when a new variant is not handled. That keeps a combination the domain forbids out of the type.

How does prototypal inheritance work, and what does class add?

Property lookup walks an internal prototype chain. A class sets the constructor and puts methods on the prototype, so instances share them. extends links the subclass prototype to the superclass prototype. The class syntax is that model, not a second one.

How do you type a deeply readonly config, and what does that not prevent?

A recursive mapped type marks each field readonly and repeats for nested objects, stopping at primitives and functions. The checker enforces readonly. A cast, or a callee that expects a mutable type, can still change the object. The type is not a runtime freeze.

What does event-loop starvation look like, and how do you confirm it?

A long synchronous stretch delays timers, I/O callbacks, and painting. Confirm it by comparing a timer's requested delay with when it actually fires, or with a profiler. Move CPU work off the thread that serves the interface, or break the work up.

How does satisfies differ from a type annotation?

An annotation widens the value to the annotated type. satisfies checks the value against a type and keeps the narrower inferred type, so the specific keys remain visible. Use it when a config must match a contract and later code still needs the exact shape.

How do you stop two overlapping updates from corrupting the same record?

Send a version or an idempotency key. The server rejects a write whose version is stale and returns the current record. On the client, ignore a response that belongs to an older request than the latest one. Disabling one button does not cover two tabs.

Check that the candidate can code without AI

These questions show how a candidate talks about JavaScript and TypeScript. They do not show the candidate writing the next change with no assistant. How to tell if a developer can code without AI explains the watched session.

What the candidate shows us is proctored tests, watched by a real person: a coding test with no AI allowed, a 2-hour build project with AI allowed, the Fire Drill (a live pair-programming session on a real-world problem), an English test, a thinking-skills test and a typing test. It also covers recorded reference checks. The menu is on Proctored tests. You pay for the tests you order. A real person watches.

When the answers are strong, Hire full-stack developers. Arca.ph is a network of remote engineers. Your own AI agent, such as Grok, Claude, or ChatGPT, searches and sorts that network. On the marketplace, the fee is a one-time 15% fee of first-year pay, only on hire, with a 3-month free replacement. Done for you is 35% of first-year pay, charged once on hire. Details are on pricing and how it works.

FAQ

How should these questions be used in an interview?

Ask two or three questions from the level you are hiring, then ask what would break. A useful interview is a conversation about a real constraint. It is not a recital of every question on this page. Use the watched coding check before you decide to hire.

What is the difference between a junior answer and a senior answer?

A junior answer names the rule and the common bug. A mid-level answer names the mechanism and one failure mode. A senior answer names a tradeoff, a failure they have seen, and what they would measure. Hire for the work the role will own, not for a perfect score on every question.

How do I check that the candidate can code without AI?

Questions do not show the candidate writing code. What the candidate shows us is proctored tests, watched by a real person: a coding test with no AI allowed, a 2-hour build project with AI allowed, the Fire Drill (a live pair-programming session on a real-world problem), an English test, a thinking-skills test and a typing test. It also covers recorded reference checks. The guide How to tell if a developer can code without AI explains the watched session.

Where do I look for engineers after the interview?

Open the full-stack developer hire page linked on this page. TypeScript, React, and Node.js are stacks listed for that role. Your own AI agent searches and sorts the Arca.ph network. You choose who to test and who to interview. Profiles are free to view once you sign up and sign the Arca.ph Client Agreement.

What does Arca.ph charge when I hire?

Arca.ph is a network of remote engineers. Your own AI agent, such as Grok, Claude, or ChatGPT, searches and sorts that network. On the marketplace, the fee is a one-time 15% fee of first-year pay, only on hire, with a 3-month free replacement. Done for you is 35% of first-year pay, charged once on hire.

Get started.

Profiles are free to view once you sign up and sign the Arca.ph Client Agreement.