Skip to main content
JavaScript Code Reorder Easy +10 XP

Function Declaration

Arrange these lines to create a working function.

Click lines in the correct order

Available lines3 left

Your order

Click lines above to build your solution.

Show answer and explanation

Answer: function add(a, b) { return a + b; }

A function starts with the declaration, then the body with return, then the closing brace.

Hint: Function declaration comes first.

What this challenge tests

Code Reorder in JavaScript: functions, basics.

Related challenges