Templates strings are an alternative to string concatenation. They allow variables to be injected into string literals to form fully interpolated strings. They also honor newline characters and other breaks within the string literal.
(oriental electronic music)…- We're going to…go back to our little side-by-side adventure here…and do some more comparison.…We're gonna talk about a simple, really,…little feature added in ES6…but it's one of those delightful features.…It's not necessarily hugely groundbreaking…or gonna radically change the way you approach your code…or even express things.…
But it's more delightful in a sense…and that does create less of the visual clutter…that our readers need to deal with.…So, let's talk about a scenario like this.…Let's say that I have name = "Kyle"…and let's say…orderNumber = "123"…and total =…319.72.…
Let's make 319.7.…If I were going to make a string to print out…some message, say I was printing out a receipt, if you will.…It's gonna print out some message…that included these values along with some text.…That message might, for example, look like this:…msg = "Hello, " + name +…", your order",…and at this point, I'm running out of line room…so I wanna break onto the next line.…
So I'm gonna do, you might've seen before the trick of…
This course was created by Frontend Masters. It was originally released on 01/10/2017. We're pleased to host this training in our library.
- The arrow function
- Arrow function variations
- Closures and explicit blocks
- Default values
- Using the gather and spread operators
- Dumping variables
- Concise properties and methods
- Symbols, iterators, and generators
- Optimizing codes for the reader
Skill Level Intermediate
1. Arrow Functions
2. Block Scope
3. Default Values and the Gather/Spread Operators
5. Template Strings
6. Symbols, Iterators, and Generators
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.