title: How to generate a random multiple of a given number bounded to a given range?
body: <p>How can I generate a random number which is a multiple of a given number while also making sure the number is also within a specified range? If there are no such multiples, it should return <code>NaN</code>.</p>
  <pre><code>const generateMultiple = (multipleOf, min, max) =&gt; {
      //how to implement?
  }
  
  generateMultiple(4, -8, 5)
  //should return either -8, -4, 0, 4
  
  generateMultiple(2.1, 1, 5)
  //should return either 2.1, 4.2
  
  generateMultiple(7, 1, 5)
  //should return NaN
  </code></pre>