Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 272 Bytes

8 kyu - Convert a Number to a String!.md

File metadata and controls

15 lines (12 loc) · 272 Bytes

Task

We need a function that can transform a number into a string.

What ways of achieving this do you know?

Examples: number_to_string(123) /* returns '123' / number_to_string(999) / returns '999' */

My solution

def numberToString(num)
  num.to_s
end