From 2b1508604b09b92ac93b803584fb9b123a6380e7 Mon Sep 17 00:00:00 2001 From: Bao-Nhi Vu <69761376+baonhivu@users.noreply.github.com> Date: Thu, 6 Oct 2022 08:30:09 -0400 Subject: [PATCH] Add in a function that outputs a random number between 0 and 9 inclusive --- express/lib/random_number.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/express/lib/random_number.js b/express/lib/random_number.js index d8eaaba..51cc38b 100644 --- a/express/lib/random_number.js +++ b/express/lib/random_number.js @@ -1 +1,19 @@ // Code goes here + + +
+ +Math.floor(Math.random() * 10) returns a random integer between 0 and 9 (both +included):
+ + + + + + +