Say I make a mistake when I’m trying to find an element and I make a typo, like $('lsdkfj').
Instead of jQuery returning me an empty array, I’d like to return an error message in the console, like
"The selector 'lsdkfj' cannot be found". What is the best way to go about doing this?
Say I make a mistake when I’m trying to find an element and I
Share
Like this: