title: How to make the variable not start new line
body: <p>I am making a website where you have to input a link, and it makes javascript, but after imputing the variable, it adds a line so it doesn't work.</p>
  
  <p>This is the code I am using </p>
  
  <pre><code>    var url = prompt("Enter the link you want the app to go to.");
      document.getElementById(2).onclick = "window.open('" + url + "', '_blank');'&gt;";
  </code></pre>
  
  <p>Anyone got suggestions?</p>