DEV Community

Discussion on: Repl Coding Challenge:Basic Recursion 👯

Collapse
 
calvinoea profile image
Calvin

Hey, David. Thanks a lot for your review and feedback 😁. I have added a recursive solution as well as the name of the language. What do you think of it now?

Collapse
 
gypsydave5 profile image
David Wickes

Nice work on the recursive solution.

Now let's make your code look pretty!

On the opening of your block of code

```

Put the language in





 ```ruby

And it'll look like this

def sum(number)
  return 1 if number == 1
  number + sum(number - 1)
end
Thread Thread
 
calvinoea profile image
Calvin

Thank you, David!