Thanks to visit codestin.com
Credit goes to github.com

Skip to content

_.random document lower > upper value swap#6115

Merged
jonchurch merged 1 commit into
lodash:mainfrom
jonchurch:random-doc-fix
Feb 23, 2026
Merged

_.random document lower > upper value swap#6115
jonchurch merged 1 commit into
lodash:mainfrom
jonchurch:random-doc-fix

Conversation

@jonchurch
Copy link
Copy Markdown
Member

Closes #6113

tldr; _.random(lower, upper) takes positional lower and upper args, but it is undocumented that it will shuffle the args into lower and upper despite position.

If lower is greater than upper, the values are swapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants