Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 377 Bytes

File metadata and controls

20 lines (16 loc) · 377 Bytes

Description

We need a function that can transform a number (integer) into a string.

What ways of achieving this do you know?

Examples (input --> output):

123  --> "123"
999  --> "999"
-100 --> "-100"

My Solution

def number_to_string(num)
  num.to_s
end