https://codepen.io/jcruz7/pen/dmERwj
- Download our latest release here.
- Move the JavaScript bundle into your project.
- In your html document add the following:
<body>
+ <div id="root"></div>
+ <script type="text/javascript" src="coconut-interpreter.bundle.js"></script>
</body>
<script>
initialCode = '42 |> print';
</script>
Note: this must be before <div id="root"></div>
!
setCode('def fish() = 1 + 1');
Note: this replaces the existing code!