# toNumber

## Description

Any number or text is converted to number type.

## Input / Parameter

| Name  | Description                          | Input Type    | Default | Options | Required |
| ----- | ------------------------------------ | ------------- | ------- | ------- | -------- |
| value | The value to be converted to number. | Text / Number | -       | -       | Yes      |

## Output

| Description                                 | Output Type |
| ------------------------------------------- | ----------- |
| Returns the converted value as number type. | Number      |

## Example

In this example, we will convert a string to number and print the result in the console.

### Step

1. Call the function `Conversion.toNumber` inside the `Log.write` function.
2. Enter the value for the `Conversion.toNumber` function. In this example, we will enter 12.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-15eed8afe5db7598b25e7cdd300e9daa90038dd4%2FtoNumber-step-1.png?alt=media)

### Result

1. The console will print `12`.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-be24cde64bbb08cfefb3bf50665783c8ca3f5307%2FtoNumber-result-1.png?alt=media)
