> If it ever happened, I guess I'd just use a try?
Exactly, you'd "just use a try". Instead of not using it.
> Much of the time "checking for null" consists of adding a single question mark.
Note: this API was introduced way before the `?` was even thought of. Which tells you a lot about the quality of the API.
So. Just for the simple task of selecting elements:
- you have to different APIs for "select 1 element"/"select multiple elements"
- these APIs differ in their behaviour. They can also throw
- almost none of the DOM APIs work with the return values of one of those APIs (e.g. your example stops working the second you use querySelectorAll)
On top of that:
- none of the DOM APIs can be chained, or combined in any meaningful way, so if you want to do more than just call one method, you're up for some very verbose and tedious boilerplate