JavaScript Template Literals

JavaScript Template Literals


JavaScript Template Literals
In this tutorial you will learn about JavaScript Template Literals is as follows: 
Template Literals are bound with backtick (` `) characters, allowing multi-line strings, for string interpolation with embedded expressions.
ECMAScript specification and was referred to as template strings prior to ES6. Similar to string interpolation features in other languages like Ruby and Python, template literals provide syntactic sugar that allows us to construct strings more quickly. Before template literals were added to the JavaScript language in ES6, single quotes (‘ ’) and double quotes (“ ”) were the only ways to make a string. Template literals offer another way to declare strings that makes use of backtick (` `) character.
Example1
Output
 
Example2
Output