browser-version/out/nedb.js
function getRandomArray (n) {
  var res, next;

  if (n === 0) { return []; }
  if (n === 1) { return [0]; }

  res = getRandomArray(n - 1);
  next = Math.floor(Math.random() * n);
  res.splice(next, 0, n - 1);   // Add n-1 at a random position in the array

  return res;
}
function getRandomArray (n) {
  var res, next;

  if (n === 0) { return []; }
  if (n === 1) { return [0]; }

  res = getRandomArray(n - 1);
  next = Math.floor(Math.random() * n);
  res.splice(next, 0, n - 1);   // Add n-1 at a random position in the array

  return res;
}
function getRandomArray ( n ) { var res , next ; if ( n === 0 ) { return [ ] ; } if ( n === 1 ) { return [ 0 ] ; } res = getRandomArray ( n - 1 ) ; next = Math . floor ( Math . random ( ) * n ) ; res . splice ( next , 0 , n - 1 ) ; // Add n-1 at a random position in the array return res ; }
Return an array with the numbers from 0 to n-1, in a random order
Return an array with the numbers from 0 to n - 1 in a random order