Template Literals

Also known as String Literals or Template Strings
This uses the Backtick ` to enclose the string characters

var myString1 = "one" 
var myString2 = "two"
var myString3 = `text $(myString1) more text $(myString2)`


This preserves the line breaks

var myString3 = `text $(myString1) 
   more text

var myString1 = 100 
var myString4 = `some text $("$" + myString1)`

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext