N
Neela megha shyam Chivukula
Hi All,
Here is my code snippet:-
my_array = [1,2,3]
puts my_array.each {}
or
my_array = [1,2,3]
my_array.each {|x| puts x}
O/p:-
1
2
3
I want to know how the array.each works. How the compiler interprets and
prints.
Thanks and regards,
Neela.
Here is my code snippet:-
my_array = [1,2,3]
puts my_array.each {}
or
my_array = [1,2,3]
my_array.each {|x| puts x}
O/p:-
1
2
3
I want to know how the array.each works. How the compiler interprets and
prints.
Thanks and regards,
Neela.