DEV Community

Discussion on: Repl Coding Challenge:Basic Recursion 👯

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!