Skip to content

Instantly share code, notes, and snippets.

@Subilan
Created June 5, 2019 15:06
Show Gist options
  • Save Subilan/749633ab49305ec6be84a531621f4d93 to your computer and use it in GitHub Desktop.
Save Subilan/749633ab49305ec6be84a531621f4d93 to your computer and use it in GitHub Desktop.
JavaScript 范围随机数生成
const randomInt = (min, max) => Math.floor(Math.random() * (max - min) + min);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment