I have an array like this:
data: Array[8]
0: 3054
1: 1986
2: 1065
3: 1053
4: 666
5: 1423
6: 137
7: NaN
and I want to shrink this array to the following in order to remove NAN so I want something like this:
data: Array[7]
0: 3054
1: 1986
2: 1065
3: 1053
4: 666
5: 1423
6: 137
according to this page : link
I use splice as follow:
allData[i].splice(allData[i].length-1, 1)
but it removes all element of array except NAN.
Can anyone help me what is my problem?