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.

21 Easy JavaScript Frontend

What are truthy and falsy values?

Short take Full answer on next page

Simple meaning

Falsy values are false, 0, empty string, null, undefined, and NaN.

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

Read full answer Example · Mistake · Say this
22 Easy JavaScript Frontend

What does the spread operator do?

Short take Full answer on next page

Simple meaning

Spread copies enumerable properties into a new object or array, which we use to update state immutably.

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

Read full answer Example · Mistake · Say this
24 Easy JavaScript Frontend

What is JSON.stringify used for?

Short take Full answer on next page

Simple meaning

It turns a JS value into a JSON string for APIs or localStorage.

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

Read full answer Example · Mistake · Say this
25 Easy DOM Frontend

What does event.preventDefault do?

Short take Full answer on next page

Simple meaning

It stops the browser's default action, like following a link or submitting a form.

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

Read full answer Example · Mistake · Say this
29 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
30 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
31 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
33 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
35 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
39 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
40 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
Prev Page 2 of 4 Next
Chat with us