Template Literals - JavaScript Tutorial - w3Schools - Chapter-19 English

Published: 09 September 2022
on channel: w3Schools Tutorials
243
4

JavaScript Template Literals
Synonyms:
Template Literals
Template Strings
String Templates
Back-Tics Syntax

Back-Tics Syntax
Template Literals use back-ticks (``) rather than the quotes ("") to define a string.

Quotes Inside Strings
With template literals, you can use both single and double quotes inside a string.

Multiline Strings
Template literals allows multiline strings.

Interpolation
Template literals provide an easy way to interpolate variables and expressions into strings.

The method is called string interpolation.

The syntax is:

${...}

Variable Substitutions
Template literals allow variables in strings.

Expression Substitution
Template literals allow expressions in strings.

Template Literals is not supported in Internet Explorer.


On this page of the site you can watch the video online Template Literals - JavaScript Tutorial - w3Schools - Chapter-19 English with a duration of hours minute second in good quality, which was uploaded by the user w3Schools Tutorials 09 September 2022, share the link with friends and acquaintances, this video has already been watched 243 times on youtube and it was liked by 4 viewers. Enjoy your viewing!