title: HTML 5/ Javascript canvas Loading image error
body: <p>I am trying to load an image inside a function, but the image is not showing on the screen. There are no console errors so i don't know why it will not work.
  Code:</p>
  
  <pre><code>var canvas = document.getElementById('canvas');
  ctx = canvas.getContext('2d');
  
  var score = 0;
  var menuImg = new Image();
  menuImg.src = "images/Startscreen.png";
  
  gamemenu();
  
  //The menu screen
  function gamemenu(){
      ctx.drawImage(menuImg,0,0);
  }
  </code></pre>
  
  <p>The image should draw when the function is called but it does not, any help?</p>