Functions without return implicitly return undefined:
function greet(name) {
console.log(`Hello, ${name}`)
}
let result = greet("Alice")
console.log(result) // undefined
This is fine for functions that perform actions (like logging). Functions that calculate values should explicitly return them.