Interview Q&A / JavaScript

INTERVIEW Q&A · 71 QUESTIONS

JavaScript interview questions

Closures, the event loop, this, promises and the core language questions every frontend round asks.

  1. How do default values and renaming work in object and array destructuring?

    In objects, {name: n = 'x'} reads property name into variable n with a default used only when the value is undefined. In arrays, position matters: [a, , c = 9]. Defaults ignore null.

    BeginnerQuick answer1 min read