num.to_str()

num.to_str(n) converts the number n to a string.

Returns

  • if n is a string, returns the string unchanged.

  • if n is a number, converts it to its base-10 string representation.

  • if n is any other type, returns null.

Last updated

Was this helpful?