// an explicit return type documents the contract
function add(a: number, b: number): number {
return a + b;
}
// an arrow function with an inferred return type
const square = (n: number): number => n * n;
console.log(add(2, 3), square(4));typed parameters, return types, and arrow functions