What is the difference between the two?
So I know that array.size()
is a function while array.length
is a property. Is there a usecase for
.size()
is not a native JS function of Array
(at least not in any browser that I know of).
.length
should be used.
.size()
does work on your page, make sure you do not have any extra libraries included like prototype that is mucking with the Array
prototype.
There might be some plugin on your browser that is mucking with the Array
prototype.