title: Assigning model value to JavaScript variable MVC 4
body: <p>I am trying to make a image slide show and I am passing urls of the images through a <strong>List</strong> in a <strong>Model</strong>.</p>
  
  <pre><code>List&lt;string&gt;
  </code></pre>
  
  <p>Onload I want to assign these URL values to JavaScript variables.</p>
  
  <pre><code>var image1=new Image()
  var image2=new Image()
  var image3=new Image()
  </code></pre>
  
  <p>My question is, how can I assign this list of URLs to the above variables, normally I can do this:</p>
  
  <pre><code>image1.src="value.jpg"
  </code></pre>
  
  <p>How can assign the value using <code>Razor</code> within JavaScript?</p>