title: Getting [object HTMLInputElement] in display instead of number
body: <p>I am taking a number as an input from an input box and on clicking a button, I want the number to be displayed on the page. But I am getting, <code>[object HTMLInputElement]</code>  as the output.</p>
  <p>Here's my typescript code:</p>
  <pre><code>let quantity = &lt;HTMLInputElement&gt;document.createElement(&quot;input&quot;);
  quantity.type = &quot;number&quot;
  quantity.id = &quot;quan&quot;
  document.body.appendChild(quantity)
  
  var getQuantity = &lt;HTMLInputElement&gt;document.getElementById(&quot;quan&quot;);
  let gq = getQuantity.toString()
  
  var btn = &lt;HTMLButtonElement&gt;document.createElement(&quot;button&quot;);
  document.body.appendChild(btn)
  
  btn.addEventListener('click', function(){
      Display.innerHTML += &quot;&lt;br&gt;&quot;+ gq
  })
  </code></pre>