I'm trying to pass an array to an object:
function process(pid, size, time, IOCArray, IOCtimeA, status) {
this.pid = pid;
this.size = size;
this.time = time;
this.IOCtimeA = IOCtimeA; // should i use this?
for (var j = 0; j < IOCArray.length; j++) {
this.IOCArray[j] = IOCArray[j];
} // or something like this?
this.status = status;
}
proarray[ID] = new process(ID, size, time, IOCArray, IOCtimeA, status);
Now how can I access for example proarray[5].IOCArray[4]?
Actually I'm not sure how to use "this" for arrays.
this.IOCArray = IOCArray.slice(0);?proarray[5].IOCArray[4]as you say? Are you getting any errors?