I'm using sparse arrays to be memory efficient with huge datasets. (and to signal the difference between a hole and a undefined or null entry) adding holes at the end is fine by setting datapoints.lentgh.
datapoints = [10,,,20,,,10,1]
No I face the problem how to insert a hole (say before 20)
datapoint.splice(3,0)
does not work, and I can't find a (easy) method to insert holes. (Think I have to rebuild the array but thought to ask before)
Or is there a way to change a "defined" entry into a hole? delete datapoint[4]; creates an undefined entry not a hole :(