What is the correct syntax for an arrow function that doubles a number?

JavaScript Associate Easy

JavaScript Associate — Easy

What is the correct syntax for an arrow function that doubles a number?

Key points

  • Arrow functions use the => syntax in JavaScript.
  • The parameter is enclosed in parentheses.
  • The function body is after the arrow and does not require curly braces.
  • The correct answer uses the const keyword to declare the function.

Ready to go further?

Related questions