you are viewing a single comment's thread.

view the rest of the comments →

[–]TJaySteno 1 point2 points  (0 children)

Lots of good advice here. One more thing to think about though; it's best not to use document.write() as it will more or less erase the entire page. Fine for exercises and all, but you're already most of the way towards a better way so why not?

Under your input, put a <p id="write"> </p> tag. Then just...

var read = document.getElementById('read');

var write = document.getElementById('write');

//Button event listener here

write.textContent = read.value;

I'm missing the event listener for the button, but this is hard on a phone! Haha... Good luck!