title: Is there a short way to store image variable?
body: <p>I would like to find a shorter way of storing an image and its source in a variable.</p>
  
  <p>Something that looks like:</p>
  
  <pre><code>ctx = document.getElementById("canvas").getContext('2d');
  </code></pre>
  
  <p>but for:</p>
  
  <pre><code>var img = new Image();
  img.src = "image.png";
  </code></pre>
  
  <p>Can this be done in a single clean line like the first example?</p>