Image for post
Image for post

That’s a good point that backtick literals will not work in Internet Explorer and older devices, including Windows phones!

Thanks for sharing Zsolt Nagy-Perge !!!

A great reference for compatibility is CanIUse.com, which clearly shows in the image above that IE and older browsers are not supported.

Another option would be using Babel to compile the code — this would actually replace all the backticks automatically.

I wrote about how Babel compiles template literals in this article:

Written by

🤓 The physical therapist who writes JavaScript 💪 Web Developer 😎 Mentor 🧠 DPT 😄 SEO Expert 😁 React 😆 Jamstack 🗯️ Ask me anything 👉 DoctorDerek.com 👈

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store