David Gilbertson tells you all about polyfills.
Faced with the reality that you can’t write modern code and expect it to work for all users, you have exactly two choices:
- Only use language features available in all the browsers you support
- Write modern code, then do something to make it work in older browsers
If you have decided on option one then I respectfully suggest that you are bonkers, and insist that you state your case in the comments. I believe that developers who are able to explore all the new stuff and use it in their day-to-day jobs stay happy, and being happy is important.