Ram

Lesson 3 of 6

Functions

Write reusable logic with function declarations and arrow functions.

Functions receive inputs through parameters and may return a result.

Arrow functions provide a compact syntax that is common in modern React code.

Example

const add = (a, b) => a + b;
console.log(add(4, 6));

Practice challenge

Write an arrow function that converts minutes to seconds.

Previous
Next