function executeCode() {
  const code = javascript.javascriptGenerator.workspaceToCode(workspace);
  eval(code);
}
Generate JavaScript code from the Blockly workspace, and execute it.

Called from index.html when the execute button is clicked.