Use the Script Editor to write scripts to extend the capabilities of the form design. By default, the Script Editor appears at the top of the LiveCycle Designer ES workspace, but you can dock it anywhere.
The Script Editor has both a single-line view and a multiline view that you can switch between, depending on your needs. Single-line view is designed to maximize the amount of space dedicated to the Layout Editor and other palettes. Multiline view is designed to maximize the amount of space for writing script.
Livecycle designer workspaces.4.4.1 Script Editor
For example, you can use the Script Editor to write a simple calculation to sum the values of two numeric fields or more complex scripts that alter the appearance of the form based on end-user actions. LiveCycle Designer ES supports scripting either in its own scripting language called FormCalc or in JavaScript.
See also 

Script Editor