> For the complete documentation index, see [llms.txt](https://ellcrys.gitbook.io/ellcrys/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ellcrys.gitbook.io/ellcrys/api/console-references.md).

# 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

```javascript
> exec("console.log(10 + 10)")
// Output: 20
```

### **runScript(filePath) (alias: rs)**

Fetch and execute a Javascript file

| Argument | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| filePath | String | The absolute path of a JS file. |

#### Example

{% tabs %}
{% tab title="In Console" %}

```javascript
> runScript("file.js")
// Output: 20
```

{% endtab %}

{% tab title="file.js" %}

```
console.log(10 + 10)
```

{% endtab %}
{% endtabs %}

### **pp(obj)**

Pretty print an object. Useful for debugging.

| Argument | Type | Description                |
| -------- | ---- | -------------------------- |
| obj      | Any  | The object to pretty print |

#### Example

```javascript
> pp({ name: "Gwen" })

// Output:
{
  "name": "Gwen"
}
```
