How do I put what is being inputed from the JS form to the window?

Hi! I’m creating a create your own adventure game from scratch! However, I can’t figure out how to take the input from the Java Script form {ie: console.log(“Welcome!”);}. I want to make it so that pressing a button will start the dialog, and present it onto the window on the right side if the screen, so that the dialog could be read back by the player. Thanks!