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