oren @oren

Advice to all Python users: learn JavaScript

Jul 6, 2022, 10:01 PM
51
View all Parent

comments

Highlighted comment

too bad, js only has a catch-all Number type, so Infinity is the right response for 1/0

JS has Error types, it can throw them. In fact, they can throw them inside the / operator itself. Watch.

x = {valueOf:1}
1/x