JavaScripture
Contribute via GitHub Feedback

StringTemplateArray : Array<String>

A StringTemplateArray is the parameter passed to tagged template functions. In addition to being an array of Strings, it contains the "raw" strings before escaping is applied. See String.raw for a built in tagged template function.

Instance Properties

raw : Array<String>  

Returns the template parts in this as written in the source code. For example, if the template string is `\n`, this[0] will be a string of length 1 containing the new line character whereas this.raw[0] will be a string of length 2 containing '\' followed by 'n'.

Example:

Run

Results: