# add

## Description

Addition of two numbers. The output will return the sum of the two numbers.

## Input / Parameter

| Name   | Description               | Input Type | Default | Options | Required |
| ------ | ------------------------- | ---------- | ------- | ------- | -------- |
| value1 | The first number to add.  | Number     | -       | -       | Yes      |
| value2 | The second number to add. | Number     | -       | -       | Yes      |

## Output

| Description                        | Output Type |
| ---------------------------------- | ----------- |
| Returns the sum of the two values. | Number      |

## Example

In this example, we will get the sum of two values and print it in the console.

### Steps

1. Drag a `button` component into the canvas and open the `Action` tab. Select the `press` event of the button and drag the `Log.write` function to the event flow.
2. Call the function `Math.add` inside the `Log.write` function.
3. Enter the values to be added.

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

### Results

1. The console will print `3`.

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