Skip to main content

Template Literals (Template Strings) Using ES6 JavaScript - #84


Like what you see, support the channel.

Published: January 24, 2022


Estimated Reading Time
1 minutes
Video Duration
18:25 minutes

In the past, I have used ES6 template literals in my tutorials, but I have never gone over what they are and how to use them properly. In this tutorial, we will dive into JavaScript Template Literals using backticks.

Using the backtick in ES6 for your strings will not only save you time but make it easier for you to expand your code and make it more readable + developer-friendly.

Basically we take something like this:

var string = "1 + 2 = " + (1+2) + "."

and we turn it into this:

var string = 1 + 2 = ${1+2}.

Let me know if you have any questions about ES6 JavaScript template literals in the comments below.

0:00 Intro

01:17 Basic String Manipulation

07:16 Expressions

09:42 Tagged Template Literals (Functions)

Join this channel to get access to perks:

https://www.youtube.com/channel/UCcr8eSk5xCfn3AbYy8WOWzg/join

Become a Patreon to show support and get exclusive access to content: https://www.patreon.com/devdrawer