# I have a block suggestion

**URL:** https://forum.makecode.com/t/i-have-a-block-suggestion/33997
**Category:** Forum Feedback
**Tags:** make, game
**Created:** [February 20, 2025, 1:30pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997 "2025-02-20T13:30:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [February 20, 2025, 1:30pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997/1 "2025-02-20T13:30:10Z")

</div>

Can one of the [@moderators](https://forum.makecode.com/groups/moderators) add a block to the arrays section?  
This block is a “if contains ”  
Please add this is would be soooo helpful  
if there is an easier way for me to do this in blocks instead of have you create a whole new block?

---

<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: [February 20, 2025, 1:32pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997/2 "2025-02-20T13:32:01Z")

</div>

Hi, @platformermaster !

I think the block that you want is already at the bottom of the **Arrays** drawer. Try the `find index of` block.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/8/3848b6d8808e4504eb1f439b9e62382d128e6e1e.png)

To use it in an `if` block, test if the result is greater than -1. In other words, if the block returns -1, then the item does not exist in the array.

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [February 20, 2025, 5:46pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997/3 "2025-02-20T17:46:46Z")

</div>

Okay i was wondering what that block did, Thanks!

---

<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: [February 20, 2025, 5:51pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997/4 "2025-02-20T17:51:25Z")

</div>

BTW, Sarge 's **BetterArrays** extension includes the block that you describe.

> [@\[Extension\] BetterArrays - 60 useful array blocks!](https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154):
>
> Attention: this post is so big that it broke Discourse’s 32k character limit, so I had to split it into two parts. Part 2 will be posted in the replies. Please don’t reply until you see part 2 posted below. Hello everyone, it’s ya boy with another extension. [Last time](https://forum.makecode.com/t/extension-stringify-convert-anything-to-strings/28585) I said I’d return with a bigger extension, so here I am, after 3 weeks of pouring digital blood, sweat and tears into this extension. This is by far the biggest extension I’ve ever created - adding 60 blocks with ~1300 lines of ext…

---

<div class="post-metadata">

### Author: ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)
#### Post date: [February 20, 2025, 6:11pm UTC](https://forum.makecode.com/t/i-have-a-block-suggestion/33997/5 "2025-02-20T18:11:10Z")

</div>

I’m not a moderator… But I made 2 function blocks based on what I think you need.

> **[If-Array-Includes-Example](https://arcade.makecode.com/84851-46906-15573-61300)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

One functions for number arrays, the other functions for string arrays.  
Tell me if anything is wrong.
