Kyle walks through the solution to exercise 0. The solution is located in the file ex0-fixed.js.
(upbeat music)…- Rather than take a whole bunch of time…to go through and type all of this stuff,…I'm simply going to walk you through the fixed version,…which is included with your exercises.…Let's talk about a few things that are going on.…First off, I've taken the iffy…and made it into an arrow function on line one.…I'll zoom in so it's a little easier to read.…And you notice that the iffy in the other one…didn't have any variables in it but I took…advantage of being able to declare variables…without statements by putting variable names…as unused parameters in that iffy.…
And they're unused because down here at the bottom, the…parentheses pair that executes it doesn't pass anything in.…So those are unused variable names…that I can then start assigning to.…So, for example I then open up my arrow function…and I open up a parentheses set because I'm…gonna put multiple statements together…or multiple expressions together using my comma operator.…And because of the operator precedence of the comma…operator, if I did that without the parentheses set,…
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.