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 Introducing Arrow Function Syntax!
You have completed Introducing Arrow Function Syntax!
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
0:00
like in the case of square and cube.
0:01
You don't need parentheses.
0:05
You can't remove parentheses on
functions with no or multiple arguments.
0:09
Only on functions with single arguments.
0:14
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 when you
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