> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build/code-in-n8n/cookbook/code-node.md).

# Code node

Code examples you can use in the Code node.

This section contains examples and recipes for tasks you can do with the Code node.

## In this section

* [Get number of items returned by last node](/build/code-in-n8n/cookbook/code-node/get-number-of-items-returned-by-last-node.md): count the items output by the previous node.
* [Get the binary data buffer](/build/code-in-n8n/cookbook/code-node/get-the-binary-data-buffer.md): access the binary data buffer to work with file contents.
* [Output to the browser console](/build/code-in-n8n/cookbook/code-node/output-to-the-browser-console.md): use `console.log()` or `print()`.

## Related resources <a href="#related-resources" id="related-resources"></a>

* [Cookbook](/build/code-in-n8n/cookbook.md)
* [Built-in methods and variables examples](/build/code-in-n8n/cookbook/built-in-methods-and-variables-examples.md)
* [HTTP Request node](/build/code-in-n8n/cookbook/http-request-node.md)
* [Built-in methods and variables reference](/build/code-in-n8n/use-built-in-shortcuts.md)
* [Using the Code node](/build/code-in-n8n/using-the-code-node.md)
