function buildTower(height) {
return "Built a tower " + height + " blocks high";
}
const buildTower = (height) => "Built a tower " + height + " blocks high";
const square = x => x * x; // single expression, with implicit return
const square = (x) => x * x; // equivalent to above, with optional parentheses
const squareRoot = x => {
const result = Math.sqrt(x);
return result;
}; // multiple lines, with explicit return
const greet = () => "Hello, world!"; // No parameters: parentheses are required
const add = (x, y) => x + y; // Multiple parameters: parentheses are required