2 ms·
My best guess is you could raise an error and then you would always know if a selector didn't match. In jQuery, a selector which doesn't match will evaluate to
by sb8244 10y ago
My best guess is you could raise an error and then you would always know if a selector didn't match.
In jQuery, a selector which doesn't match will evaluate to true, where as .length would be 0. This is a source of bugs, I'm sure, especially for beginners.