-
Notifications
You must be signed in to change notification settings - Fork 0
randomKey
Subhajit Sahu edited this page Dec 28, 2022
·
1 revision
Pick an arbitrary key.
function randomKey(x, fr)
// x: ilists
// fr: random number generator ([0, 1))
const xilists = require('extra-ilists');
var x = [['a', 'b', 'c'], [1, 2, 3]];
xilists.randomKey(x);
// → 'c'
xilists.randomKey(x);
// → 'b'