title: Can I use a variable in JS for my html?
body: <p>I have a JS file <code>CharacterSelection</code> where a user can select an avatar and type their name into a textarea.</p>
  
  <p>Now I want to set a text div in an html file to the contents of the textarea. I will use it to display the player's name at a specific location on the screen.</p>
  
  <p>I know that I can set a div to a text, such as: <code>&lt;div id ="statSheetExitButton"&gt;Exit&lt;/div&gt;</code> will show "Exit" (style and location depending on css)</p>
  
  <p>I'm wondering if there is any way to put a String variable in there, since I will not know what name the player enters.</p>
  
  <p>I grab the textarea's contents using <code>var name = $("#nameTextBox").val();</code></p>
  
  <p>I'm thinking that saying <code>&lt;div id ="playerName"&gt;name&lt;/div&gt;</code> will display the text "name".</p>
  
  <p>Is there a way to accomplish my goal? </p>