+ 1
What is the difference between length, count and size?
Differences with respect to array and ruby.
2 Antworten
+ 2
length returns the length of an array only, it dosen’t accept any additional arguments.
size is a just alias of length.
count can accept condition and count on it.
So, length or size are prefered when you just need to know the size of an array. count - when you need to count elements by some condition.
0
If you are talking of arrays, all these terms have different contextual meaning. Read on datastruct