From c07b6b5c84b529887359cf0d411681f96f1fd287 Mon Sep 17 00:00:00 2001 From: Shafrazi Date: Tue, 16 Oct 2018 01:17:27 +0530 Subject: [PATCH] Added similar methods to .length (#18729) --- .../guide/english/ruby/common-array-methods/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/src/pages/guide/english/ruby/common-array-methods/index.md b/client/src/pages/guide/english/ruby/common-array-methods/index.md index 0cf9f88ed6..e24d80e0f7 100644 --- a/client/src/pages/guide/english/ruby/common-array-methods/index.md +++ b/client/src/pages/guide/english/ruby/common-array-methods/index.md @@ -18,6 +18,16 @@ The .length method tallies the number of elements in your array and returns the array.length => 5 ``` +This is also similar to .count and .size methods. + +``` ruby +array.count +=> 5 +``` +``` ruby +array.size +=> 5 +``` #### .first The .first method accesses the first element of the array, the element at index 0: