Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 308 Bytes

Convert a Number to a String!.md

File metadata and controls

20 lines (15 loc) · 308 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"

Solution:

function numberToString(num) {
  return num.toString();
}