JavaScript Template Literals In 90 Seconds #JavaScriptJanuary

preview_player
Показать описание
Watch the entire #JavaScriptJanuary series from the beginning!

JavaScript template literals are awesome! With template literals we can use multiple lines without using the escaped new line character (\n) or concatenating with the plus symbol (+). We can use double and single quotes freely. And we can include variables, do math calculations, or even call a function that returns a value.

The key to the template literal is the back-ticks. (Pun intended) That’s the key just to the left of the number one key on your keyboard. Now we can format the string more naturally, making it easier to see how the output will look.

To add variables we can use a placeholder by using ${}, then within the placeholder we use an expression. This expression can be a variable, math calculation, or even a function. This is called expression interpolation.

Lastly, there is something called tagged template literals. This is basically passing a template literal into a function.

By doing this we can separate the strings from the expressions and then manipulate them as needed.

I'll be releasing a new video every day in January! Stay tuned..
_____________________________________

📚 Learn to CODE in just a FEW months here:
_____________________________________

🛠️ Tools I use:

_____________________________________

💖 Show support!
_____________________________________

Watch Next:
_____________________________________

Connect With Me:
_____________________________________

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

#JavaScriptJanuary #31Days31Videos #codeSTACKr
Рекомендации по теме
Комментарии
Автор

Thanks for all of the support! Stay tuned for a new video every day in January!!

Watch the entire #JavaScriptJanuary series from the beginning!

📚 My Favorite Web Design Books 📚
Web Design with HTML, CSS, JavaScript and jQuery Set by Jon Duckett (paid link)

codeSTACKr
Автор

Thanks for making video like this. Love it <3

capungkomplek
Автор

nice video...Which font and theme are you using?

rajeshsahu
Автор

I've been watching JS tutorials and keep seeing them use template literals when I copied their code I thought the backticks were just single quotations. 🤦

federalbureauofinvestigati