HTMLCollection .item() and [] Use

80 views Asked by At

There are 2 ways to get a Node from a HTMLCollection:

collection.item(#) and collection[#]

Now both work equally well. And they do the same thing, but [#] let's you think its an Array, what it isn't.

Is there a real difference in use? Or are there time you should use one over the other?

0

There are 0 answers