random value beetween 2 numbers  [ 692 views ]

Goal: get a number between a range

  Math.random() * (max - min) + min;

let’s extend the Math object:

ObjectExtend(Math, 'randomBetween', 
  function(min, max) { 
    return Math.random() * (max - min) + min;
  });
#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }