> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/code/builtin.md).

# Use built-in methods and variables in Duaer

Duaer's built-in methods and variables for working with data in expressions. The Code node runs plain JavaScript and native Luxon.
## Expressions and the Code node are not the same engine

The expression editor can use $json, $("Node name"), $now, $if(), and transformation methods on strings, arrays, and dates. The Code node does not use that expression engine.

If the Code node says is not a function, check whether the method exists only in expressions. Date formatting can use format() in an expression; in the Code node, use Luxon’s toFormat(). plus() and minus() accept (amount, unit) in an expression; in the Code node they expect an object such as { days: 7 }. The expression-style call may not throw in the Code node, and still not do what you meant.

$if(), $ifEmpty(), and $jmespath() exist only in expressions. The lookup is [Methods and variables reference for Duaer](/code-examples/methods-variables-reference.md).

## Which page to open

- The current item, earlier nodes, conditions, and empty values: [Use convenience methods in Duaer expressions](/code/builtin/convenience.md).
- Arrays, booleans, dates, numbers, objects, and strings: [Use data transformation methods in Duaer](/code/builtin/data-transformation-functions.md).
- HTTP node pagination: [Use HTTP node pagination variables in Duaer](/code/builtin/http-node-variables.md).
- JSON queries: [Query JSON with JMESPath in Duaer](/code/cookbook/jmespath.md).
## Questions

### Can Duaer transformation methods run in the Code node?

Duaer transformation methods, $if(), and $jmespath() belong to expressions. The Code node runs plain JavaScript and native Luxon. Use toFormat() instead of format(), and plus({ days: 7 }) instead of plus(7, "days").

### Which Duaer variable reads the current item?

In a Duaer expression, the current item is $json and its file is $binary. An earlier node is $("Node name").item, first(), last(), or all().

## Related

- [Use convenience methods in Duaer expressions](https://doc.duaer.com/code/builtin/convenience.md)
- [Use data transformation methods in Duaer](https://doc.duaer.com/code/builtin/data-transformation-functions.md)
- [Methods and variables reference for Duaer](https://doc.duaer.com/code-examples/methods-variables-reference.md)

