Update topic sentence

A simple fix to better frame the difference between a transpiler and a polyfill.
This commit is contained in:
mikemitchell574 2020-10-24 22:10:06 -04:00 committed by GitHub
parent 2d5be7b730
commit 901e5ef8a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ Actually, there are two parts in Babel:
2. Second, the polyfill.
New language features may include new built-in functions and syntax constructs.
New language features may include not only syntax constructs, but also built-in functions.
The transpiler rewrites the code, transforming syntax constructs into older ones. But as for new built-in functions, we need to implement them. JavaScript is a highly dynamic language, scripts may add/modify any functions, so that they behave according to the modern standard.
A script that updates/adds new functions is called "polyfill". It "fills in" the gap and adds missing implementations.