# \[Extension\] BetterArrays - 60 useful array blocks!

**URL:** https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154
**Category:** Show & Tell
**Tags:** extension
**Created:** [June 7, 2024, 4:44pm UTC](https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154 "2024-06-07T16:44:30Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [June 13, 2024, 4:12pm UTC](https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154/10 "2024-06-13T16:12:39Z")

</div>

📢 **1.2.0 update** (yes, there have been minor updates I didn’t announce)  
Changelog:

- Added new `shuffle` and `toShuffled` methods (certainly not related to [the upcoming jam](https://forum.makecode.com/t/announcement-makecode-arcade-mini-game-jam-20-board-game-jam/29077)) 🤭
- Fixed minor issues and updated dependencies

## Shuffle method

The shuffle method rearranges items in an array in a random order. This method modifies the original array.

```auto
function shuffle(array: any[]): void

```

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/859bb10e49f226d367f5f2b3db021593735a3af0.png)

## To shuffled method

The toShuffled method returns an array copy with items rearranged in a random order. This method does **not** modify the original array.

```auto
function toShuffled(array: any[]): any[]

```

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6dc38168de35e991735bb42ce0837a5342483f46.png)

Until next time, peace ✌

---

_[View the full topic](https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154)._
