If an expression evaluates to a number, as in the previous example, then the numeric value is passed in.
Determining how such values should output in the result is part of the tag’s job.
The tag receives data about the template literal as individual pieces and must combine the pieces to create the result.
The first argument is an array containing the literal strings as interpreted by Java Script.
But the real power of template literals comes from tagged templates.
This left a backlog of problems and nuanced behavior that made making mistakes easy and often required more code just to achieve very basic behaviors.
below is the code for validating mobile number with enter only numeric, length must be 10 digits and restrict user to entering illegal characters.
Retrieving the raw string information like this allows for more complex processing when necessary.
The raw string information is also passed into template tags.