> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # return > Return from a `execute` method or exit script. Return from [`execute`](/docs/swml/reference/calling/execute) or exit script. **`return`** `any` — required The return value. --- ## **Properties** No specific parameters. The value can be set to `any` type. ## **Variables** Set by the method: * **return\_value:**(out) Optional return value. ## **Examples** ### Return with optional value #### YAML ```yaml version: 1.0.0 sections: main: - return: 1 ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "return": 1 } ] } } ``` ### Return with multiple values #### YAML ```yaml version: 1.0.0 sections: main: - execute: dest: fn_that_returns - play: url: 'say: returned ${return_value[0].a}' fn_that_returns: - return: - a: 1 - b: 2 ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "execute": { "dest": "fn_that_returns" } }, { "play": { "url": "say: returned ${return_value[0].a}" } } ], "fn_that_returns": [ { "return": [ { "a": 1 }, { "b": 2 } ] } ] } } ``` ### using the `on_return` parameter #### YAML ```yaml version: 1.0.0 sections: main: - execute: dest: fn_that_returns on_return: - play: url: 'say: returned ${return_value}' fn_that_returns: - return: hello ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "execute": { "dest": "fn_that_returns", "on_return": [ { "play": { "url": "say: returned ${return_value}" } } ] } } ], "fn_that_returns": [ { "return": "hello" } ] } } ``` ### Return with no value #### YAML ```yaml version: 1.0.0 sections: main: - return: {} ``` #### JSON ```json { "version": "1.0.0", "sections": { "main": [ { "return": {} } ] } } ``` Additional examples are available in the [introduction](/docs/swml/guides/deployment#from-a-web-server). > Return from a `execute` method or exit script.