0

Difference between array.length and array.size?

16th Dec 2020, 11:45 AM
Carlos Leandro Miguel Latyn
Carlos Leandro Miguel Latyn - avatar
4 Answers
+ 3
which language?
16th Dec 2020, 11:56 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 1
Leandro Latyn , I haven't coded in ruby much, but here's what I get from google search : """ Array#size is just an alias to the Array#length method. It executes same Array#length method internally. """ https://rubyinrails.com/2014/01/15/ruby-count-vs-length-vs-size https://batsov.com/articles/2014/02/17/the-elements-of-style-in-ruby-number-13-length-vs-size-vs-count/ I highly recommended searching for solutions with Google or any other search engine of your preferences before asking to anyone else. It really saves a lot of time.
16th Dec 2020, 12:35 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 1
Thank you so much and I will search with Google next time šŸ§
16th Dec 2020, 12:39 PM
Carlos Leandro Miguel Latyn
Carlos Leandro Miguel Latyn - avatar
0
Ruby
16th Dec 2020, 12:27 PM
Carlos Leandro Miguel Latyn
Carlos Leandro Miguel Latyn - avatar