How do I get javascript to return this value?
<p>The alert works, but the return is 0.  How do I get it to return the correct value?</p>

<pre><code>var img;
img = new Image();
img.onload = function() {
   alert(img.width);
   return(img.width);
};
img.src = "https://maps.gstatic.com/mapfiles/dir/bike.png";
alert(img.width);
</code></pre>
