This is the original code i try to replace, the index of countval represent "a stored value" then actual element at each index "is number of occurences of stored value", can i remove the innerloop below using fill?
And will it be faster?
I would be glad on some help howto use fill with an offset.
I do understand that Array(3).fill(4) will fill element 1-3 in whatever array with 4,4,4 but that is index 0,1,2? how can i set an offset "startpoint".
JT
for (var j=start;j<end;j++){
temp=countval[j]
for (var k=0;k<temp;k++){
dval[p]=j;
p++;
}
}