I am new to JavaScript and I am trying to build a client-side reference extractor for scientific PDFs. I want each reference on a separate line. I have tried '\n'
and '<br>'
, they do not work. Here is an example:
references = ["1", "2", "3"];
document.getElementById("output").textContent = references.join('<br>');
<div id="output">
<div>Extracting...</div>
</div>
My output is
1<br>2<br>3