# Can Functions take List/Arrays as parameters?

**URL:** https://forum.makecode.com/t/can-functions-take-list-arrays-as-parameters/351
**Category:** PXT
**Created:** [July 18, 2019, 4:46pm UTC](https://forum.makecode.com/t/can-functions-take-list-arrays-as-parameters/351 "2019-07-18T16:46:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Clayfox](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Clayfox](https://forum.makecode.com/u/Clayfox)
#### Post date: [July 18, 2019, 4:46pm UTC](https://forum.makecode.com/t/can-functions-take-list-arrays-as-parameters/351/1 "2019-07-18T16:46:41Z")

</div>

In the block editor of either Arcade or Circuit Playground, I see that Functions can take parameters, but they’re Text, Boolean, or Number. I haven’t figured out if I can pass a List to a Function, but that would be SUPER USEFUL!!!

In arcade, flipping Sprite animations for left walking to right walking would be nice in arrays. Recursive functions with list inputs would be sweet for maze solvers. So many reasons.

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [July 18, 2019, 6:45pm UTC](https://forum.makecode.com/t/can-functions-take-list-arrays-as-parameters/351/2 "2019-07-18T18:45:24Z")

</div>

In the Blocks editor, that’s not currently possible. (You definitely can do that in the JavaScript editor.)

What you could do, though, is create a variable that’s used only by your function. Set that variable to an array ahead of time, and then call your function.

Just a few months ago, we had to do this for any parameter that we were passing to a function, since MakeCode Arcade only recently has allowed functions to have parameters in the Blocks editor.

This doesn’t quite work for recursive function calls, but it works for most other applications.

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

> **[Array Function Parameters - Microsoft MakeCode](https://arcade.makecode.com/47063-04727-36649-92876)**
>
> Made with ❤️ in MakeCode Arcade.
