Loading
Current section: 1. Expressions And Output 7 exercises
Problem

Template Literals

Loading exercise

Transcript

00:00 Alright. You remember how we were doing all of that escaping and for new lines and parentheses or or and apostrophes and all of that stuff? Well, there's an easier way to write those kinds of strings, and it's called template literals. And one of the cool things about template literals is it also simplifies concatenation of stuff as well because it has this special syntax for what we call interpolation, which is a dollar sign and two curly braces, and everything inside of there is actually just JavaScript. So that is cool.

00:31 We're going to be using template literals. This is with a back tick, and it's going to simplify a whole bunch of stuff for us on doing multiline strings and quotes and all of that stuff. So go ahead and run with that. Have a good time with it, and we'll see you when you're done.