# Arrays that don't want to be arrays

**URL:** https://forum.makecode.com/t/arrays-that-dont-want-to-be-arrays/8565
**Category:** micro:bit
**Created:** [June 6, 2021, 5:18pm UTC](https://forum.makecode.com/t/arrays-that-dont-want-to-be-arrays/8565 "2021-06-06T17:18:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![averybadcoder](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@averybadcoder](https://forum.makecode.com/u/averybadcoder)
#### Post date: [June 6, 2021, 5:18pm UTC](https://forum.makecode.com/t/arrays-that-dont-want-to-be-arrays/8565/1 "2021-06-06T17:18:11Z")

</div>

I’m working on a little microbit arcade, where you select a game and play it (obviously), and the first game I’m making is snake, so I made two arrays to store the player’s previous X and Y coords for the tail, but the blocks I’m using to add the X and Y on seem to believe the array is a type ‘number’ as opposed to a type ‘number[]’. I have attatched a picture of the only two mentions of these arrays in the code.

 ![Screenshot 2021-06-06 13.40.35](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c58e24c05d3d8c6d3fff58c9b742d822c1e6e2a3.png)  
How can I fix this?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [June 6, 2021, 8:51pm UTC](https://forum.makecode.com/t/arrays-that-dont-want-to-be-arrays/8565/2 "2021-06-06T20:51:39Z")

</div>

Think you want something like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/72ff91a0defdd0929c47300d2b7791c8fbd072b4.png)

---

<div class="post-metadata">

### Author: ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)
#### Post date: [June 7, 2021, 3:49pm UTC](https://forum.makecode.com/t/arrays-that-dont-want-to-be-arrays/8565/3 "2021-06-07T15:49:06Z")

</div>

The pill-shaped `insert at beginning` returns the size of the resulting list, which is a single number. As @UnsignedArduino has shown, you probably want to use the connecting block version of `insert at beginning`, which is a little further down in the palette of blocks.

It’s a little confusing that there are two versions and that the one that returns the list length is above the one that’s probably more commonly used. It may be worth opening an [Issue](https://github.com/microsoft/pxt-microbit/issues) on the github repo to see if anyone is willing to either change the order, change the names, or move the one that returns the length to a `...` sub-palette.
