title: When i click button the value is not sending in js?
body: <p>I make mini app to find factorial. When i click button and get number in <code>js</code> it is not showing any thing.
  This is my <code>script.js</code></p>
  <pre><code>function factorial() {
  let number = document.getElementById(&quot;number&quot;)
  console.log(number);
  for (let i = number - 1; i &gt;= 1; i++) {
      number = i * number
      console.log(number);
  }
  console.log(number);
  return number;
  }
  </code></pre>
  <p>this is my <code>index.html</code></p>
  <pre><code>&lt;input type=&quot;text&quot; name=&quot;number&quot; class=&quot;number&quot; id=&quot;number&quot;&gt;
  &lt;button onclick=&quot;factorial()&quot; class=&quot;btn btn-primary &quot; style=&quot;padding-right: 160px;padding-left: 160px&quot;&gt;Find&lt;/button&gt;
  </code></pre>