← Back to challenges

Using Arrow Functions

JavaScriptMediumdata_structureslanguage_fundamentals

Instructions

Create a function that returns the given argument, but by using an arrow function.

An arrow function is constructed like so:

arrowFunc=(/*parameters*/)=>//code here

Examples

arrowFunc(3) ➞ 3

arrowFunc("3") ➞ "3"

arrowFunc(true) ➞ true

Notes

Check the Resources tab for more information on arrow functions.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Frames Per Second