Global
This part of the documentation describes the global objects and methods available in the Javascript console.

Global Methods

exec(expression)

Execute arbitrary Javascript expressions
Argument
Type
Description
expression
String
The JS expression to execute

Example

1
> exec("console.log(10 + 10)")
2
// Output: 20
Copied!

runScript(filePath) (alias: rs)

Fetch and execute a Javascript file
Argument
Type
Description
filePath
String
The absolute path of a JS file.

Example

In Console
file.js
1
> runScript("file.js")
2
// Output: 20
Copied!
1
console.log(10 + 10)
Copied!

pp(obj)

Pretty print an object. Useful for debugging.
Argument
Type
Description
obj
Any
The object to pretty print

Example

1
> pp({ name: "Gwen" })
2
3
// Output:
4
{
5
"name": "Gwen"
6
}
Copied!