0π
β
the type of myData
is the type of chartData, which is number[]
. findIndex will iterate on numbers which has no .chartData property.
const x = myData.findIndex(i => i >= 0);
0π
"chartData" is not a property of i.
"i" within the findIndex callback is an entry of "myData".
So "i.chartData" is wrong.
I donβt know the actual context but try to replace "i.chartData" with "i" only.
Source:stackexchange.com