Reference error: shuffle is not defined

Hi @andersoc, I just paste the following code before shuffle(indices)

function shuffle(a) {
  var j, x, i;
  for (i = a.length - 1; i > 0; i--) {
      j = Math.floor(Math.random() * (i + 1));
      x = a[i];
      a[i] = a[j];
      a[j] = x;
  }
  return a;
}

To edit your code, click view code tab. In the htlm folder, there is a experimentname.js file. Open it and then you can edit it.

1 Like