I'm trying to populate the value of a textarea in my html with javascript. My script below basically does that, however I'm trying to figure out how to insert a line break in my value (between 'date' and 'text').
Basically, as written, my script gives this result...
On Dec. 25 you replied: Merry Christmas!
However, I would like it to read as...
On Dec. 25 you replied:
Merry Christmas!
<script>
function myFunction() {
document.getElementById("myTextarea").value = `On ${date} you replied: ${text}`;
}
</script>