Kyle continues explaining the gather and spread operators by showing how they could be used with an existing list of parameters or values. He also answers a few audience questions about assigning default values to a gather operator or using it as a default value.
(synth-heavy, Asian pipe music)…- [Kyle] But here's something cool:…because this is just a regular arguments list,…we don't actually need to add that on to the array.…We can just literally put the value…"42" right there.…We don't even need to modify the array.…Let's say "42, comma, dot, dot, dot, args."…I think that's a whole lot more declarative form,…as opposed to the imperative form over on the left.…What we mean by the difference between…declarative and imperative is this specifically,…don't miss this:…the difference between declarative and imperative…is that imperative includes all of the implementation…details of how, but most of those…implementation details of how are not the things…that the programmer should have to think about…at that moment.…
So what we're doing is taking those details,…abstracting them away into the engine inside of…a feature, so that what's left is the stuff…that we should focus on.…How many of you have heard before that the purpose…of abstraction is to hide details?…Anybody heard that?…
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.