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

# getRandomFromArray

Get a random item from an array!

Getting a random item from an array!

{% code title="randomFromArray.js" %}

```javascript
import { getRandomFromArray } from 'the-simplifier'

let random = async() => {
  let array = [1, 'two', true]

  let result = getRandomFromArray(array)

  console.log(result)
}

random() // Expected: A random item from array
```

{% endcode %}
