stebbin45
stebbin45

Reputation: 119

Chrome developer tools console - What are the brackets around some logged objects?

I'm logging some object, arrays, strings to Chrome console in this jsFiddle:

http://jsfiddle.net/RkXqg/

Some of the console objects have brackets [] around them .. others don't..

What do the brackets mean? ...does a console object look different if its detached from DOM? etc... can't find doc on this..

Thanks much..

enter image description here

Upvotes: 0

Views: 536

Answers (1)

Stephen
Stephen

Reputation: 5770

jQuery will return an array for all matches to the selector you pass into the $ function. If you want to access the DOM object itself, access that index from the array: $('selector')[0]

Upvotes: 1

Related Questions