Frontend track

JavaScript interview questions and answers

Panel-ready Frontend Master questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.

3 Moderate JavaScript Frontend

How does prototypal inheritance work?

Short take Full answer on next page

Simple meaning

Objects have an internal prototype link used when a property is missing.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
4 Moderate JavaScript Frontend

What is the prototype chain?

Short take Full answer on next page

Simple meaning

It is the walk from an object to Object.prototype and then null while looking up a property.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
5 Moderate JavaScript Frontend

How would you implement debounce in an interview?

Short take Full answer on next page

Simple meaning

I keep a timeout id, clear it on every call, and set a new timeout that fires the original function after wait ms.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
7 Moderate DOM Frontend

What is event delegation and why is it useful?

Short take Full answer on next page

Simple meaning

I put one listener on a parent and use event.target to see which child was clicked.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
9 Moderate JavaScript Frontend

What is the temporal dead zone?

Short take Full answer on next page

Simple meaning

Let and const exist in the scope from the start of the block but cannot be read until the declaration line.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
13 Moderate Browser Frontend

What is the Same-Origin Policy?

Short take Full answer on next page

Simple meaning

A page can freely read data only from the same scheme, host, and port.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
14 Moderate TypeScript Frontend

When would you pick interface over type?

Short take Full answer on next page

Simple meaning

I pick interface for object shapes that might be extended or merged in declaration files.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
15 Moderate TypeScript Frontend

How do you type a React component's props?

Short take Full answer on next page

Simple meaning

I define a Props interface and annotate the function parameter.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
16 Moderate TypeScript Frontend

What is unknown versus any?

Short take Full answer on next page

Simple meaning

Any turns off checking, so I can access any property and hide bugs.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
17 Moderate TypeScript Frontend

How do union types help with API response states?

Short take Full answer on next page

Simple meaning

I model idle, loading, success with data, and error with a message as a discriminated union.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
18 Moderate Web APIs Frontend

What is Intersection Observer used for?

Short take Full answer on next page

Simple meaning

It tells you when an element enters the viewport without scroll listeners.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
19 Moderate Web APIs Frontend

What is the History API?

Short take Full answer on next page

Simple meaning

PushState and replaceState change the URL without a full reload, which SPAs use for routing.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
Page 1 of 2 Next
Chat with us