# Assertion failed error

**URL:** https://forum.makecode.com/t/assertion-failed-error/4012
**Category:** micro:bit
**Created:** [October 22, 2020, 5:04am UTC](https://forum.makecode.com/t/assertion-failed-error/4012 "2020-10-22T05:04:33Z")
**Posts on this page:** 1
**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:04am UTC](https://forum.makecode.com/t/assertion-failed-error/4012/1 "2020-10-22T05:04:33Z")

</div>

Hi,  
I am getting an assertion failed error for some functions I am trying to use, this happens when building the page (I can see this under the javascript -\> explorer part) and does not appear as a compilation error.

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?
