What is the difference between "array.length" and "array.length()" ? If it's a bad question, forgive me. I am asking this because I am making a lot of mistakes regarding this. Thanks in advance.
CodePudding user response:
array.length
and array.length()
both are language specific. Both returns the length of array but some languages like java use array.length() while languages like javascript uses array.length property.
CodePudding user response:
If we talk about javascript array.length is return a number where as array.length() you r calling a treating length as a function that is not valid for an array