Tagged Templates
the ins and outs of tagged templates using a literalFragments array, and the tag & format functions
We'll cover the following...
A template tag is a function performing a transformation on a template literal, returning a string. The signature of a tag function is:
Press + to interact
tagFunction( literalFragments, ...substitutionValues )
literalFragments
is an array of Strings that store fragments of the template literal. We use substitutions to split the original template literal.- the rest parameter
...substitutionValues
contains the