Codington
0 of 6 problems solved • 0%

Exercise prompt

Use a Concise Return

An arrow function with a single expression and no braces automatically returns that expression's value.

Example

const triple = (number) => number * 3;

triple(4) returns 12. With braces, the equivalent is (number) => { return number * 3; }: the block body needs an explicit return.

Your task

Complete the concise arrow function so double(6) returns 12.