# I need to randomly rearrange the indices in an Array

**URL:** <https://forum.kirupa.com/t/i-need-to-randomly-rearrange-the-indices-in-an-array/316753>\
**Category:** Uncategorized\
**Created:** [December 1, 2010, 5:25pm UTC](https://forum.kirupa.com/t/i-need-to-randomly-rearrange-the-indices-in-an-array/316753 "2010-12-01T17:25:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![screeg](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@screeg](https://forum.kirupa.com/u/screeg)\
**Post date:** [December 1, 2010, 5:25pm UTC](https://forum.kirupa.com/t/i-need-to-randomly-rearrange-the-indices-in-an-array/316753/1 "2010-12-01T17:25:33Z")

</div>

That’s it! I understand how Math.random works, and I understand how Arrays work, but I don’t understand how to either rearrange the indices of an existing Array, or how to populate it from another Array in a random sequence without an index possibly repeating.

If somebody could briefly give me an idea, I can probably figure out the exact script.

Thanks much!
