title: How do I create a distribution group of a range of numbers by a given number of groups
body: <p>In Javascript, 
  if I have a range of numbers, say 0-10000.
  like this:</p>
  
  <pre><code>var min = 0;
  var max = 10000;
  </code></pre>
  
  <p>and I want to split this range into a number of buckets by a input:</p>
  
  <pre><code>var buckets = 5;
  </code></pre>
  
  <p>in this case, I want to return an array of numbers that splits up this range:
  ie. the resulting numbers would be: 0, 2000, 4000, 6000, 8000, 10000</p>
  
  <p>if I said 10 buckets, the numbers would be 0, 1000, 2000, etc....</p>
  
  <p>My issue is if I have 8 buckets, 12 buckets 32 buckets....
  How would I do this in javascript?
  Thanks.</p>