title: How to display the value of a javascript variable in html?
body: <p>I want to display the input value entered  on click of button "Go".
  The input value is stored in the variable named "value" and made visible in id="show".</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div&gt;
  &lt;input type="text" id="input" /&gt;
  &lt;button onclick="go()"&gt;Click&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;div id="show" style="display: none;"&gt;
  &lt;p&gt;${value}&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  
  
  function go() {
      document.getElementById('show').style.display = "block";
     let value = document.getElementById('input').value;
  }
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>