Error: Assertion failed

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?

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

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

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