I have this code that is supposed to create a list of 100 random numbers between 0-1, then reshuffle those numbers so that all the numbers have a mean of 0.75 and an SD of 0.125.

```
randomList = function(n, a, b) {
list = [],
i;
for (i = 0; i < n; i++) {
list[i] = Math.random() * (b - a) + a;
}
return list;
}
descriptives = function(list) {
mean,
sd,
i,
len = list.length,
sum,
a = Infinity,
b = -a;
for (sum = i = 0; i < len; i++) {
sum += list[i];
a = Math.min(a, list[i]);
b = Math.max(b, list[i]);
}
mean = sum / len;
for (sum = i = 0; i < len; i++) {
sum += (list[i] - mean) * (list[i] - mean);
}
sd = Math.sqrt(sum / (len - 1));
return {
mean: mean,
sd: sd,
range: [a, b]
};
}
forceDescriptives = function(list, mean, sd) {
oldDescriptives = descriptives(list),
oldMean = oldDescriptives.mean,
oldSD = oldDescriptives.sd,
newList = [],
len = list.length,
i;
for (i = 0; i < len; i++) {
newList[i] = sd * (list[i] - oldMean) / oldSD + mean;
}
return newList;
}
```

When I run this online, Pavlovia says i is not defined.

What do I need to do?