# Coding in Page Flow

In Page Flow, the [**`Custom Code`**](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/custom-code) block allows you to add [Javascript](https://en.wikipedia.org/wiki/JavaScript) code and implement advanced custom functionality.&#x20;

## Zingy API

Use Zingy's comprehensive Javascript API in Page Flow for completely custom implementations or for AI-Wiz assisted logic development.

Click [here](https://docs.zingy.ai/app-editor/page-flow/zingy-api-for-page-flow) for API Documentation.

## DOM/Web API

You can write code to manipulate the page/form [HTML5 DOM](https://en.wikipedia.org/wiki/Document_Object_Model) and access objects and invoke methods and functions that are part of the [standard Web API](https://developer.mozilla.org/en-US/docs/Web/API) implemented by the browser.

## Open Source/Proprietary Libraries

Zingy allows you to reference open-source, 3rd party and proprietary libraries/scripts in your app's pages and forms. This can be done at the [app-level](https://docs.zingy.ai/app-settings#html-head-additions) (where all pages and forms reference the library) or at the [page-level](https://docs.zingy.ai/page-settings#html-head-additions).

You can access objects, call functions/methods from these libraries using the [Custom Code](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/custom-code) block.

## Page Flow Variables and Functions

The variables and functions that are added to Page Flow (using blocks) can also be referenced by the code within the [Custom Code](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/custom-code) block.

## Javascript Assets

In Business or higher editions, you can create and edit Javascript file assets. The code within the the [Custom Code](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/custom-code) block can reference variables and call functions in Javascript file assets if they have been added to the specific page/form or to the app.&#x20;

{% hint style="warning" %}
NOTE: For code safety and efficiency, variables and functions declared inside the [Custom Code](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/custom-code) block are not visible outside the block.
{% endhint %}
