js forEach with arrow function with and without curly braces

const numbers = [1, 2, 3];

// Braces omitted: clean, concise, and ideal for single operations
numbers.forEach(num => console.log(num * 2));

const numbers = [1, 2, 3];

// Braces included: allows multiple statements and operations
numbers.forEach(num => {
const doubled = num * 2;
if (doubled > 2) {
console.log(doubled);
}
});