title: Is possible to save JavaScript variable as file?
body: <p>Is there a way to convert a string from a JavaScrip variable, into a downloadable file that users can download when clicking a button ?</p>
  <p>Thanks for any advice.</p>
  <pre><code>&lt;div id=&quot;txt&quot;&gt;Lorem Ipsum&lt;/div&gt;
  &lt;br /&gt;
  &lt;button id=&quot;test&quot;&gt;Download text as file !&lt;/button&gt;
  </code></pre>