# Defining an array of type any\[\]\[\] crashes the simulator in blocks

**URL:** <https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679>\
**Category:** Help\
**Created:** [March 22, 2023, 4:49pm UTC](https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679 "2023-03-22T16:49:44Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [March 22, 2023, 4:49pm UTC](https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679/1 "2023-03-22T16:49:44Z")

</div>

Executing this code in blocks will crash the simulator:

```auto
foo = [[]]

```

(blocks implementation)

 ![arcade-screenshot (1)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2ec3a9abeefe631a02ca94914cdcd6c59ab65cc7.png)

Is there a solution at the moment? I found a workaround but it’s janky and this method is just clean. Thanks in advance

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 22, 2023, 5:25pm UTC](https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679/2 "2023-03-22T17:25:49Z")

</div>

What does the error actually say?

---

<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:** [March 22, 2023, 10:02pm UTC](https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679/3 "2023-03-22T22:02:51Z")

</div>

```auto
Type 'undefined[][]' is not assignable to type 'number[]'.
Type 'undefined[]' is not assignable to type 'number'.

```

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 22, 2023, 11:49pm UTC](https://forum.makecode.com/t/defining-an-array-of-type-any-crashes-the-simulator-in-blocks/18679/4 "2023-03-22T23:49:50Z")

</div>

it should infer the typing once you start using it (e.g. pushing elements into it)

this is still a bug though; thanks for reporting!
