Tutorials Examples

Drakon.Tech JavaScript tutorial: how to generate source code

How to make a JavaScript file

  1. Create a module.
  2. Set "JavaScript" as the language for the module.
  3. Click on the "Build" button (Ctrl+B).

How to make a JavaScript function

Create a DRAKON flowchart inside the module.

How to add arguments to the function

  1. Create a "Parameters" icon on the DRAKON flowchart.
  2. Type into the "Parameters" icon the names of the arguments, one argument per line. Do not put any commas.

A function with parameters "left" and "right":

A function with parameters

How to make a function async

Put the keyword "async" in the first line of the "Parameters" icon.

An async function:

An async function