2 ms·
You're weird if you write code like this.
by have_faith 5y ago
You're weird if you write code like this.
- qayxc 5y agoThe sad part is that you don't have to and still encounter one of these cases. The reason is that JS is dynamically typed and thus functions are free to return multiple result types. So you might run into one of these and get unexpected results because at some point in your code one of the functions returned an empty array instead of a number or a boolean, or divided by zero, or... It's good to at least be aware of these edge cases so you can avoid them.