Hacker News new | past | comments | ask | show | jobs | submit login

Math.min.apply(Math, [1, 2, 3]) Math.max.apply(Math, [1, 2, 3])

Could just be:

Math.max(...[1, 2, 3])




The JS code is written in ES5 so this syntax is not available.


There are several other examples which show both ES6 and ES5 syntax, there is no reason the better ES6 syntax couldn't be shown here as well.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: