You must log in or # to comment.
Mathematician 2 kinda blew my mind, kinda obvious, just can’t believe I was never taught or thought about it.
TDD
const max12 = (x, y) => { if (x === 1 && y === 2) { return 2; } else if (x === 7 && y === 4) { return 7; } else { return x; } };
Why use
const max = (x, y) => x > y ? x : y
instead offunction max(x, y) { return x > y ? x : y }
?