Using the Javascript Editor
You can use the embedded JavaScript editor to write Marlowe code.
To use the editor follow these steps:
- Open the Marlowe Playground.
- Click Start coding! and select Javascript from the menu.
You will see a window like this: 
- You can import values and functions from the provided library written in TypeScript. They can be used to generate Marlowe smart contracts from TypeScript or JavaScript.
- Describe a contract in the editor, alternatively, you can upload an example written in JavaScript. The last expression in the file needs to be of type Contract: below we define the top-level constant contract to be of that type.

- Click Compile to convert this contract from Javascript into Marlowe.
- Then click Send to Simulator in the top right-hand corner.
You can also find more details about simulation in the Marlowe tutorial.
Find official copy of this document here:
https://docs.cardano.org/en/latest/marlowe/get-started-js.html
© Copyright 2020, IOHK Revision d7c21086.
Find this document translated into other languages at: http://CardanoForTheWorld.com