---
title: HypeXAPI.getDefault
slug: hypexapigetdefault
description: Learn how to use the getDefault() function in HypeXAPI to retrieve specific default values or retrieve all defaults in your code. Find out how to specify the key of the default you want to retrieve and optimize your code for improved efficiency.
docTags: 
createdAt: 2022-05-04T09:25:57.000Z
---

The getDefault() function returns the value of a specified default key. If no key is specified, all defaults are returned.

To use the getDefault() function, simply specify the key of the default you wish to retrieve. For example, to retrieve the default value for key "foo", you would use the following code:

```javascript
HypeXAPI.getDefault("foo");
```


If no key is specified, all defaults are returned. For example, to retrieve all defaults, you would use the following code:

```javascript
HypeXAPI.getDefault();
```

