Arrow Functions (=>)
short function definition without writing function; ideal for one-liners and use with array methods.
Simple enough for a 5-year-old to understand
Arrow function syntax
short functions are written with =>. If there is a single expression, { } and return are not needed.
const square = x => x * x;console.log(square(6));🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 21