title: Javascript function inside of string, how to add it to javascript to be called on for later
body: <p>I have been trying to figure this out for a while, and I cannot wrap my head around how to do this. I dynamically created a function composed of different strings, and I would like to be able to turn this into actual javascript that can be called on.</p>
  
  <p>I simplified this example but it still should help solve my problem.</p>
  
  <pre><code>var previewStringFunction = "function updateMap() {"
   + "some javascript code" + "}"
  </code></pre>