Arrow Helpers
JavaScript
10 pts
Arrow Helpers
Write two arrow functions (no function keyword):
squaretakes a numbernand returnsn * n.fullNametakesfirstandlastand returns them with one space between, using a template literal.
The starter already prints with them. The output must be:
49 Selam Tesfay
Checklist
- Create
squarethat returns a number times itself. - Create
fullNamethat joins first and last name with a space. - Use arrow syntax (
=>) for both, nofunctionkeyword. - The two lines are printed.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
