Skip to content

Commit

Permalink
added random_digit.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Nov 22, 2022
1 parent e915d6d commit da9d862
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions random_digit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function random_digit() {
const nums = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
return nums[Math.floor(Math.random() * 10)];
}

module.exports = random_digit;
module.exports.default = random_digit;

0 comments on commit da9d862

Please sign in to comment.