As the title suggests.
Below is what I did, and what I get printed on the console. Any suggestions?
The HTML bit
<body> <div> <p id="stuff">Stuff to store in a JS var</p> </div> <script src="sw.js"></script> </body>
The JS bit
let htmlTxt = document.getElementById("stuff").value; console.log(htmlTxt);
What it prints on the console
I’d appreciate your help very much.