I’m logging a jQuery object, which assigns to
eg: $obj = <div></div>
if I
log $obj
I get ”
<div></div>
, which is what I need. But when I
Log 'some string' + $obj
I get this
[ object, object]
which is not what I want. How do I get the normal log
Don’t use
+; that will convert both to strings, giving you an unhelpful representation. Instead, pass two arguments intoconsole.log: