---
description: >-
  The Function node allows you to write custom JavaScript and run it as a step
  in your workflow.
---

# Function

### JavaScript <a href="#javascript" id="javascript"></a>

The Code node supports Node.js.

### Supported JavaScript features <a href="#supported-javascript-features" id="supported-javascript-features"></a>

The Code node supports:

* Promises. Instead of returning the items directly, you can return a promise which resolves accordingly.
* Writing to your browser console using `console.log`. This is useful for debugging and troubleshooting your workflows.

### Built-in methods and variables <a href="#built-in-methods-and-variables" id="built-in-methods-and-variables"></a>

iMBrace's workflow provides built-in methods and variables for working with data and accessing n8n data.&#x20;

The syntax to use the built-in methods and variables is `$variableName` or `$methodName()`. Type `$` in the Code node or expressions editor to see a list of suggested methods and variables.
