Skip to main content

Polyfills

What is a Polyfill?

Polyfill

A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it.

Why are polyfills important?

Polyfills are used to address issues where browsers implement the same features in different ways. The polyfill uses non-standard features in a certain browser to give JavaScript a standards-compliant way to access the feature.

Polyfills in JS interviews

Polyfill is an extremely popular interview question for the role of Frontend Developers. It shows the clarity of the candidate in Vanilla JS concepts and how well are they able to execute a modern functionality using basic JS.