paint-brush
What Are Template Literals In Javascript And Why You Should Use Themby@manik
1,124 reads
1,124 reads

What Are Template Literals In Javascript And Why You Should Use Them

by Manik4mMarch 14th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

ES6 introduces something know as template literals, which enable JavaScript to handle multiples lines of strings more efficiently and elegantly. Instead of using single quotes or double quotes, you can delimit strings using backticks (`) This is how strings were declared pre ES6 using double quotes or single quotes. Using substitutions you can dynamically populate data within the strings declared using template literal substitutions. Substitutions can be used to compute JavaScript expressions within them. This makes them powerful and an inviting feature to ES6.

People Mentioned

Mention Thumbnail
Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - What Are Template Literals In Javascript And Why You Should Use Them
Manik HackerNoon profile picture
Manik

Manik

@manik

🤯 My Brain Keeps Talking, Always 📙 Love To Learn New Tech 👨🏼‍🏫 Passionate About Teaching 🤓 Nerd For Sure

About @manik
LEARN MORE ABOUT @MANIK'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Manik HackerNoon profile picture
Manik@manik
🤯 My Brain Keeps Talking, Always 📙 Love To Learn New Tech 👨🏼‍🏫 Passionate About Teaching 🤓 Nerd For Sure

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Infoq
Opensourceagenda
Aiurs
M0yng
Ru
Leftic
Allella
Runonflux
Plex