simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

pickRandom.js (714B)


      1 "use strict";
      2 
      3 Object.defineProperty(exports, "__esModule", {
      4   value: true
      5 });
      6 exports.pickRandomDocs = void 0;
      7 var pickRandomDocs = {
      8   name: 'pickRandom',
      9   category: 'Probability',
     10   syntax: ['pickRandom(array)', 'pickRandom(array, number)', 'pickRandom(array, weights)', 'pickRandom(array, number, weights)', 'pickRandom(array, weights, number)'],
     11   description: 'Pick a random entry from a given array.',
     12   examples: ['pickRandom(0:10)', 'pickRandom([1, 3, 1, 6])', 'pickRandom([1, 3, 1, 6], 2)', 'pickRandom([1, 3, 1, 6], [2, 3, 2, 1])', 'pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])', 'pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)'],
     13   seealso: ['random', 'randomInt']
     14 };
     15 exports.pickRandomDocs = pickRandomDocs;