<p dir="auto">Basic JavaScript: Waypoint: Generate Random Whole Numbers within a Range (<a href="http://freecodecamp.com/challenges/waypoint-generate-random-whole-numbers-within-a-range" rel="nofollow">http://freecodecamp.com/challenges/waypoint-generate-random-whole-numbers-within-a-range</a>)</p>
<p dir="auto">I've tried this over and over for about an hour and I've looked it up on Google and from what I can see, I'm doing this right.</p>
<p dir="auto">Here is my code which I believe is correct...</p>
<p dir="auto">var min = 0;<br>
var max = 12;<br>
function myFunction() {<br>
// Make myFunction return a random number between zero and nine instead of a decimal<br>
// Only change code below this line.</p>
<p dir="auto">return Math.floor(Math.random() * (9 - 1 + 1)) + 1;<br>
}</p>
<p dir="auto">// Only change code above this line.<br>
// We use this function to show you the value of your variable in your output box.<br>
(function(){return(myFunction());})();</p>
<p dir="auto">Depending on the number that is generated, it's either correct on 2 out of 3 points none.</p>
<p dir="auto">No matter what I do, I can't get the third point.  I'm pretty sure it's a bug because I've looked this up and the fact is that the results of my code give what the exercise is asking for.</p>
<p dir="auto">Here is the readout...</p>
<p dir="auto">assert(myFunction() &gt;= min, 'The random number that's generated by myFunction should be greater than or equal to the minimum number');<br>
assert(myFunction() &lt;= max, 'The random number that's generated by myFunction should be less than or equal to the maximum number');<br>
assert((function(){if(editor.getValue().match(/max/g).length &gt;= 2 &amp;&amp; editor.getValue().match(/min/g).length &gt;= 2 &amp;&amp; editor.getValue().match(/Math.floor/g) &amp;&amp; editor.getValue().match(/Math.random/g)){return(true);}else{return(false);}})(), 'You should be using the function given in the description to calculate the random in number in a range');You should be using the function given in the description to calculate the random in number in a range</p>
<h4 dir="auto">Challenge Name</h4>

<h4 dir="auto">Issue Description</h4>

<h4 dir="auto">Browser Information</h4>

<ul dir="auto">
<li>Browser Name, Version: Google Chrome 55.0.2883.87 m</li>
<li>Operating System: Windows 8.1</li>
<li>Mobile, Desktop, or Tablet: Desktop</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;form action=&quot;/submit-cat-photo&quot;&gt;
    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-xs-6&quot;&gt;
        &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;indoor-outdoor&quot;&gt;Indoor&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-xs-6&quot;&gt;
        &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;indoor-outdoor&quot;&gt;Outdoor&lt;/label&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-xs-4&quot;&gt;
        &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot;&gt;Loving&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-xs-4&quot;&gt;
        &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot;&gt;Lazy&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-xs-4&quot;&gt;
        &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot;&gt;Crazy&lt;/label&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;input class=&quot;form-control&quot; type=&quot;text&quot; placeholder=&quot;cat photo URL&quot; required&gt;
    &lt;button class=&quot;btn btn-primary&quot; type=&quot;submit&quot;&gt;&lt;i class=&quot;fa fa-paper-plane&quot;&gt;&lt;/i&gt;Submit&lt;/button&gt;
  &lt;/form&gt; 
&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">form</span> <span class="pl-c1">action</span>="<span class="pl-s">/submit-cat-photo</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">indoor-outdoor</span>"<span class="pl-kos">&gt;</span>Indoor<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">indoor-outdoor</span>"<span class="pl-kos">&gt;</span>Outdoor<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-4</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>"<span class="pl-kos">&gt;</span>Loving<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-4</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>"<span class="pl-kos">&gt;</span>Lazy<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-4</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>"<span class="pl-kos">&gt;</span>Crazy<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
      <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">class</span>="<span class="pl-s">form-control</span>" <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">placeholder</span>="<span class="pl-s">cat photo URL</span>" <span class="pl-c1">required</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-primary</span>" <span class="pl-c1">type</span>="<span class="pl-s">submit</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">i</span> <span class="pl-c1">class</span>="<span class="pl-s">fa fa-paper-plane</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">i</span><span class="pl-kos">&gt;</span>Submit<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span>
  <span class="pl-kos">&lt;/</span><span class="pl-ent">form</span><span class="pl-kos">&gt;</span> 
<span class="pl-kos">&lt;/</span>div<span class="pl-kos">&gt;</span></pre></div>
<h4 dir="auto">Screenshot</h4>

<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14169239/22007405/0ff06e4e-dc38-11e6-9bb5-ed2948bc0af4.png"><img src="https://cloud.githubusercontent.com/assets/14169239/22007405/0ff06e4e-dc38-11e6-9bb5-ed2948bc0af4.png" alt="screenshot 653" style="max-width: 100%;"></a></p>
<p dir="auto"><em>Edited by moderator</em></p>