A tag function is an expression prefixed to a string template. While tag functions are not commonly used, Kyle shares a few use cases where they can be beneficial.
(electronic music)…- So, let's talk now about an extra feature…that's included with interpol-literals…that is probably not terribly self-obvious…what this is or what it's for.…It is possible for me to put an expression…directly in front of the interpolated literal…and that expression will act as essentially a function call.…
So, you're thinking, well, what is the foo function?…It would be a function that we would have to define…and you might assume that that function…would receive the interpolated string literal…as its argument, it's not really quite that.…It's sort of like that but not quite, okay.…So let me talk to you about what this foo function would do.…This foo function is going to receive…as it's first perimeter, as its first argument,…by convention we like to call it strings.…
I mean, you can call these whatever you want,…but by convention most people call it strings.…Because what it is is an array of all of the string literals…from here, so it is gonna be an array…that includes that string, and that string,…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.