Hacker News new | ask | show | jobs
by nicbou 1606 days ago
No need to waste any time: Math.max(...arr)

Even when I know how to do something, I look it up just in case. Sometimes there's a cleaner approach, or I learn that I don't fully understand the problem.

1 comments

In this case if you look it up on MDN you'll see that Math.max(...arr) isn't recommended for large arrays (ask me how I know)
I would suspect that. How do you know?

(this sort of discussion is what I'd love to see in a tech interview)