how to download sample text file when i click the link in d3.js? : 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <a href="">Please Download Sample file</a>

<!-- end snippet -->

<!-- begin snippet: js hide: false console: true babel: false -->
i have to download following sample.txt file when i click the link..
how to add download option in d3.js
<!-- language: lang-html -->
sample.txt:
    hello world...

<!-- end snippet -->

