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 you handle errors with async/await, and why can try/catch miss some of them?

    Wrap await calls in try/catch. The catch only sees rejections that are awaited inside the try. A promise you forget to await, or return without awaiting, escapes the block.

    IntermediateQuick answer1 min read