Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion JavaScript_Basics/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Math.min(50, 50, 810, 2200, -900); // will return -900
Math.max(230, 250, 10, 300, -900); // will return 300

// round function
Math.random(); // returns a random number
Math.round(5.899);

// returns a random number that is not an integer between 1 to 10.
Math.random() * (10 - 1) + 1;

// Defining variables to carry out the mathematical functions on.
value1 = 10;
Expand Down