Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Getting Started With ES2015!
You have completed Getting Started With ES2015!
Preview
Arrow function syntax can be even more concise. In this video we'll modify existing arrow functions to be shorter.
This video doesn't have any notes.
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
If your arrow function only
takes a single argument like in
0:00
the case of square and cube,
you don't need parenthesis.
0:02
You can't remove parenthesis
on functions with no or
0:09
multiple arguments,
only on functions with singe arguments.
0:13
If you're only using one line of code,
you don't need the return keyword.
0:17
It will always return
the value of the statement
0:23
without the use of the return keyword.
0:26
You can reduce the arrow syntax
further by removing the curly braces
0:29
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