Bahram
0
Q:

ruby how to get length

# Ruby code for length() method 
  
# declaring array 
a = [18, 22, 33, nil, 5, 6] 
  
# declaring array 
b = [1, 4, 1, 1, 88, 9] 
  
# declaring array 
c = [18, 22, 50, 6] 
  
# length method example 
puts "length() method form : #{a.length()}\n\n"
  
puts "length() method form : #{b.length()}\n\n"
  
puts "length() method form : #{c.length()}\n\n"
1

New to Communities?

Join the community