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
array.size()
array.length
array.length isn't necessarily the number of items in the array:
var a = ['car1', 'car2', 'car3']; a[100] = 'car100'; a.length; // 101
The length of the array is one more than the highest index.
As stated before Array.size() is not a valid method.
Array.size()
More information