What is the best answer to divide by 0
hillelwayne.com
hillelwayne.com
* Infinity
* Throw Error
* 0
* Something else
I wanted to submit this as an ask hn, and share the url that suggest the 0 answer, but I sort of failedBut really, I prefer to engineer the code such that divide-by-zero errors cannot occur. A divide-by-zero is an invalid operation better to be avoided entirely.