Exercices

Estimated reading: 1 minute 65 views

Exercise 1: Function Declaration

Write a function called greet that takes a name parameter and returns a greeting message like "Hello, [name]!".

Exercise 2: Function Expression

Create a function expression called add that takes two parameters a and b and returns their sum.

Exercise 3: Arrow Function

Rewrite the add function from Exercise 2 using arrow function syntax.

Share this Doc

Exercices

Or copy link