| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Pick an arbitrary infix.
Similar: randomInfix, infixes, hasInfix, searchInfix.
function randomInfix(x, n, fr)
// x: an array
// n: number of values [-1 ⇒ any]
// fr: random number generator ([0, 1))const xarray = require('extra-array');
var x = [1, 2, 3];
xarray.randomInfix(x);
// → [ 1, 2 ]
xarray.randomInfix(x, 1);
// → [ 2 ]
xarray.randomInfix(x, 1);
// → [ 3 ]| Back | FazBrowse Home | New Git URL |