It's simple, i want to add an undefined element to an array, lets say i have an array Punkt and i have punkt[0] = x: 15, y:"16s"
. As i know for ex. the element will have 4 punkt in total i want to add an undefined element to punkt[3]
, so that also the others punkt[1]
and punkt[2]
will become undefined
.
I need this because somewhere later in my code i do a check for undefined
, and throw an error based on this.
Racks is an object that contains an array of objects Punkt
punkt[0] = {
x: 5,
y: "16s" }
What i tried:
racks[trimdevID].punkt[$('#posTable tr:last td:first').text()] = undefined;