<p dir="auto">From challenge <a href="http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine</a></p>
<p dir="auto">The format below is required and seems redundant:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Math.floor(Math.random() * (3 - 1 + 1)) + 1;"><pre class="notranslate"><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">floor</span><span class="pl-kos">(</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-c1">3</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">But shouldn't this work better as it is more succinct:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Math.floor((Math.random() * 3) + 1);"><pre class="notranslate"><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">floor</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">*</span> <span class="pl-c1">3</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine</a> has an issue. Not precisely a bug, but I didn't know any other way how to report it. The point is, when boundaries are given, I think it's pointless requiring strict Math.random()*(max-min+1)+min, when you can insert certain values.</p>