JavaScript Shell

An interactive Javascript shell that can be used to execute JavaScript commands. The shell contains a console that displays error messages, warnings etc.

Example:

<JSShell id = "jseditor" 
        code = "var a = 22;" >
</JSShell>

Open interactive preview

Options:

  • code | string: JavaScript code to be evaluated. Default: ''.
  • solution | string: for programming questions, code string representing the official solution for the problem. Default: ''.
  • hints | array: for programming questions, an array of hints providing guidance on how to approach the problem. Default: [].
  • precompute | boolean: controls whether the default code should be executed once the component has mounted. Default: false.
  • chat | boolean: controls whether group chat functionality should be enabled. Default: false.
  • check | string: appended JavaScript code to check the code to be evaluated. Default: none.
  • disabled | boolean: controls whether to disable all user inputs and make the code block static. Default: false.
  • lines | number: number of lines to display. Default: 5.
  • fontFamily | string: undefined. Default: 'Courier New'.
  • fontSize | number: undefined. Default: 16.
  • onEvaluate | function: callback invoked whenever the Evaluate button is clicked. Default: onEvaluate() {}.
  • vars | object: scope object with variables that should be made available to evaluated code. Default: none.

results matching ""

    No results matching ""