# Error: Assertion failed

**URL:** https://forum.makecode.com/t/error-assertion-failed/4013
**Category:** Help
**Created:** [October 22, 2020, 5:05am UTC](https://forum.makecode.com/t/error-assertion-failed/4013 "2020-10-22T05:05:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ameyrr250](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ameyrr250](https://forum.makecode.com/u/ameyrr250)
#### Post date: [October 22, 2020, 5:05am UTC](https://forum.makecode.com/t/error-assertion-failed/4013/1 "2020-10-22T05:05:49Z")

</div>

Hi,  
I am getting an assertion failed error for some functions I am trying to use,

Basically, one of them is,  
testArray:number[] = [0,1,2];

testArray.find(o =\> o\>0)

or with

testArray.find(o =\> o\>5)

I get an assertion error on this.

Can anyone please let me know how to fix this?  
I know that it might have to do with o not having a type declaration or that an element is not found so udefined is returned, but how can I fix it?

---

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 22, 2020, 2:03pm UTC](https://forum.makecode.com/t/error-assertion-failed/4013/2 "2020-10-22T14:03:13Z")

</div>

Could it be that the lambda expression is not supported in MakeCode? The Javascript is actually TypeScript. These resources may answer you question.

> **[JavaScript](https://arcade.makecode.com/javascript)**
>
> The Microsoft MakeCode programming environment uses JavaScript along with the Static TypeScript language.

  

> **[Rocket-fast embedded TypeScript for MakeCode Arcade - Microsoft Research](https://www.microsoft.com/en-us/research/blog/rocket-fast-embedded-typescript-for-makecode-arcade/?ocid=msr_blog_makearcd_hero)**
>
> When we began developing Microsoft MakeCode, a computing education platform, it was all about making programming easier, more engaging, and just plain friendlier. After all, if we were going to inspire the next generation of coders, easier entry into...

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [October 22, 2020, 4:53pm UTC](https://forum.makecode.com/t/error-assertion-failed/4013/3 "2020-10-22T16:53:24Z")

</div>

Could you share a link to the code that is giving this error? It’s working as expected for me ☹

```typescript
let testArray: number[] = [0, 1, 2, 3, 252];
game.splash(testArray.find(o => o > 50) + " ")

```

> **[Untitled](https://arcade.makecode.com/11605-08121-62764-65789)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
