Template Literals
Ryan Christiani,
CSS-Tricks,
Jan 07, 2021
So I just learned about template literals in Javascript. I know, I know, they've been around since 2016. But I only came across them today as a consequence of rebuilding the gRSShopper aggregator (lots of updates coming to the repository shortly). What's interesting is not just what I learned but how I learned. I was writing code to convert JSON-encoded data from my API to HTML text I could display on a web page. As I edited the script, Visual Studio Code offered to refactor my code to use Javascript templating. "What?" I wondered, tried the refactoring, then started searching to figure out just what was happening here. I did not find a lot, but I found enough to let me try it out myself and make it work. I this this is a very satisfactory outcome, and the combination of performance support plus online resource really worked for me this time.
Today: 5 Total: 31 [Share]
] [