Interview Q&A / JavaScript
JavaScript interview questions
Closures, the event loop, this, promises and the core language questions every frontend round asks.
Prefer rapid revision? Practise JavaScript short interview answers →
- What do [] + [] and [] + {} evaluate to in JavaScript?
[] + [] is the empty string and [] + {} is "[object Object]". The + operator turns both sides into strings when neither is a number, and an empty array stringifies to an empty string.
IntermediateQuick answer1 min read