Skip to content

Commit 4e3483f

Browse files
committed
Added console logs and comments to show each step of the random number process
1 parent c4aa0c2 commit 4e3483f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sprint-1/1-key-exercises/4-random.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ const scaled = decimal * range;
1818
const floored = Math.floor(scaled);
1919
// Shift the number up to start at the minimum
2020
const result = floored + minimum;
21+
// Log each part to understand the process
22+
console.log("decimal:", decimal);
23+
console.log("range:", range);
24+
console.log("scaled:", scaled);
25+
console.log("floored:", floored);
26+
console.log("result:", result);

0 commit comments

Comments
 (0)