> For the complete documentation index, see [llms.txt](https://docs.streamavatars.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/helper-class/randomelement.md).

# randomElement

```lua
return function
    local values = { 'word1', 'word2', 'word3'};
    local test = helper.randomElement(values);
    log(test); 
    --this will log a random string from values. It could be word1, word2, or word3
end
```
