0
Factorial in ruby
Def factorial(x) Puts 1.upto(x).inject('*') end factorial(5) Can anyone explain how this is executing ??
1 Réponse
0
Actually I want to understand
Puts 1.upto(x).inject('*)
Def factorial(x) Puts 1.upto(x).inject('*') end factorial(5) Can anyone explain how this is executing ??