Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Practice arrow function syntax by converting regular function declarations to arrow function expressions, refactoring arrow functions, and debugging arrow functions.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Hey there!
0:09
Welcome to practicing arrow
functions syntax in JavaScript.
0:09
My name is Ashley and this is a follow up
to the third part of the getting started
0:13
with ES 2015 course,
create functions using arrow syntax.
0:17
To get the most out of
this practice session,
0:20
I recommend making sure you've completed
that section of the course first.
0:23
Arrow functions allows us to write
shorter, more concise functions and
0:27
can be used to solve some scope
related JavaScript problems.
0:31
For more information on this and
0:34
the appropriate use of arrow functions,
check out the teacher's notes.
0:35
In the meantime,
we'll be practicing the correct syntax for
0:39
writing arrow functions so you're ready
to incorporate them in future projects.
0:42
To get started, check out
the workspace attached to this video.
0:46
Inside you'll find three files,
convert.js, refactor.js, and debug.js.
0:50
Each file will give you the chance
to practice arrow function syntax
0:57
in a slightly different way.
1:00
This may seem a little daunting.
1:02
But don't worry,
we'll go through each file one at a time.
1:04
By the time you're done with this
practice session you'll be a total pro
1:07
at writing arrow functions.
1:10
And don't forget, to run your files you'll
use node inside of the workspace console.
1:11
We'll start with convert.js.
1:17
Go ahead and open up this file.
1:19
Inside, you should see three
regular function declarations,
1:21
addToTen, divideUs and printMyName.
1:25
Your goal is to convert each of
these function declarations to
1:29
arrow function expressions.
1:32
Give this a try and
1:34
then head back to video two of this series
to check your work and see my solution.
1:35
Talk to you soon.
1:39
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up