Sometimes a function should both return a value and log a message for users. You’ll implement a helper that sums two numbers, logs the result, and returns it.
This exercise reinforces writing a clear return type while also verifying console output.
announceTotal(a: number, b: number): number.console.log('Total:', sum).announceTotal(3, 4) // logs Total: 7 and returns 7
announceTotal(10, 0) // logs Total: 10 and returns 10