For example, when I run the following code in Chrome's JavaScript console,
$("p")
I get the following output:
<p>...</p>
As we can see, we get a DOM element rather than a jQuery object. But when I don't use the Chrome's JS console and rather use the code directly in a webpage along with some console.log(), I get a jQuery object.
[object Object]{0: HTMLParagraphElement {...}, 1: HTMLParagraphElement {...}, ...
From the above, we can ascertain that when using Chrome's JS console directly, the selector 'always' returns a DOM element rather than a jQuery object. When I test the same piece of selector code in the Edge browser's JS console, I get the correct jQuery object. What's the problem with Chrome?