+ 3

What is the uses of length property in array

21st Mar 2017, 6:56 AM
haritha
haritha - avatar
4 ответов
+ 14
It is often used as a stop condition in loops if you want to loop over an array, e.g.: for (int i = 0; i < array.length; i++) { }
21st Mar 2017, 7:03 AM
Tashi N
Tashi N - avatar
+ 10
@Geoffrey Caught in the act 😂
21st Mar 2017, 5:01 PM
Tashi N
Tashi N - avatar
+ 1
@Tashi Go to work! :D
21st Mar 2017, 7:09 AM
Geoffrey L
Geoffrey L - avatar
+ 1
Length is the same as if you said "count"... in Php it is "count"... it will give you an integer of how many elements inside your array.
21st Mar 2017, 7:10 AM
Geoffrey L
Geoffrey L - avatar