Parses and evaluates sourceCode with the interpreter identified by languageId. The value of sourceCode is expected to be a String (or convertible to one). Returns the evaluation result.
the evaluation result, depending on the sourceCode and/or the semantics of the language evaluated.
Exceptions can occur when an invalid languageId is passed, when sourceCode cannot be evaluated by the language, or when the executed program throws an exception itself.
identifies the language.
contains the source code to be evaluated.
Exports the JavaScript value under the given key to the polyglot bindings. If the polyglot bindings already had a value identified by key, it is overwritten with the new value. The value may be any valid Polyglot value.
TypeError if key is not a String.
identifier of polyglot binding that should be written.
content of polyglot binding that should be written.
Imports the value identified by key from the polyglot bindings and returns it. If no language has exported a value identified by key, undefined is returned.
the value of the polyglot binding or undefined if it does not exist.
TypeError if key is not a String.
identifier of polyglot binding that should be read.
Interface for Polyglot object. The functions of the Polyglot object allow you to interact with values from other polyglot languages.