You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the idea is that pickRandom returns a single value like pickRandom([6,7]) does, unless you want it to return multiple values like pickRandom([1,2,3,4], 2), in which case it returns an array with the number of values that you configured.
So I think:
the documentation needs to be improved to clarify that
pickRandom([6]) returning [6] is a bug, should return 6 instead
pickRandom([6,7]); //returns either 6 or 7
pickRandom([6]); //returns [6] instead of 6
Seen on Node 8.9.0
The text was updated successfully, but these errors were encountered: