Why Hacker News recommends it
4 comments from 1 distinct recommending reader, between 2020 and 2020.
- Recommends
Yep, I came to the same conclusion twitter.com/jaffathecake/status/1296423…
Math.min(Math.max(num, min), max)Read the thread - Disagrees
I don't think so. Whereas an if statement is easy to read twitter.com/jaffathecake/status/1296423…
Math.min(Math.max(num, min), max)Read the thread - Disagrees
I don't find this a whole lot easier to read to be honest. It seems like doing minification manually, when we have tools to do that for us. An if statement seems a lot clearer, and minifies well twitter.com/jaffathecake/status/1296423…
Math.min(Math.max(num, min), max)Read the thread - Cites it
twitter.com/ben_a_adams/status/12964633…
Math.min(Math.max(num, min), max)Read the thread