Software Engineering ยท APIs & Systems
A piece of code that implements a browser API or language feature in environments where it doesn't natively exist yet.
Example: A script that adds `Array.prototype.flat` to older browsers that don't support it.
In practice: Polyfills add weight โ shipping polyfills for features your actual users' browsers already support is waste. Tools like Browserslist and `@babel/preset-env` can target only what's actually needed.