From b11b63a56552de5f0c7c2ce83bc6a117356530b1 Mon Sep 17 00:00:00 2001 From: Nicky Laczko Date: Wed, 27 Aug 2014 18:06:37 -0400 Subject: [PATCH] added Math.celi, round, max & min --- javascript/numbers | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/javascript/numbers b/javascript/numbers index 6f45c5f..e0b8c7c 100644 --- a/javascript/numbers +++ b/javascript/numbers @@ -28,3 +28,8 @@ NaN; // result of e.g. 0/0 // There are a lot more things you can do with Math Math.PI; // = 3.141592653589793 Math.floor(1.618); // = 1 +Math.random(); //this will generate a random number +Math.min(1, 5, 8887, -88); // = -88 will return since Math.min returns the lowest number out of a set +Math.max(56, 78, 63, 90, 10); // = 90 will return since Math.max does the basic opposite of Math.min +Math.celi(5.9); // = 6, celi rounds up +Math.round(4.2); // = 4, it rounds to the closet integer