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. What is the difference between the spread and rest operators?

    Both are written as three dots. Rest collects many values into one array or object, in function parameters and destructuring. Spread expands one array or object into many items, in calls and literals.

    BeginnerQuick answer1 min read