From 100ff58df02c15cc3d42ea6602e2672b90ec6dd9 Mon Sep 17 00:00:00 2001 From: Christian James Date: Fri, 21 Aug 2015 16:30:57 -0300 Subject: [PATCH] New class for custom functions for number New class for custom functions for number --- number-prototypes.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 number-prototypes.js diff --git a/number-prototypes.js b/number-prototypes.js new file mode 100644 index 0000000..7fb6c64 --- /dev/null +++ b/number-prototypes.js @@ -0,0 +1,8 @@ +CustomNumber = { + randomMinMax: function (min, max) { + if(min && max){ + return Math.floor(Math.random() * (max - min + 1)) + min; + } + return false; + } +}