Re:Two Things About Conditionals in JavaScript
by emef on Monday December 10, 2012 @10:16PM
(#4902859)
I'd argue that it's a bad practice to leave out the last else if condition even when it seems redundant. What happens if NaN is passed to your function? It will return 'big' when you probably want to throw an exception or something more meaningful.
[ Parent
| on HN ]
There are no comments on this comment yet.