title: Is FileReader take more time to load?
body: <p>Below is my code</p>
  
  <pre><code>var uploadIDImage = {
      IDPos: {},
      IDNeg: {}
  };
  
  var FR = new FileReader();
  
  FR.onload = function(e) {
      console.log("123");
      console.log(e);
      $("#UploadIDPos img").remove();
          $("#UploadIDPos i").hide();
      $('#UploadIDPos').prepend('&lt;img id="IDPosImg" style="width: 140px; height: 80px;"/&gt;');
      var img = document.getElementById('IDPosImg');
    img.src = FR.result;
      uploadIDImage.IDPos.Files = FR.result.split(",")[1];
      console.log("11111");
  };
  
  if(e.target.files[0]) {
      FR.readAsDataURL(e.target.files[0]);  
      if(originalIDPosSize === undefined) {
              var size = Math.round(e.target.files[0].size / 1024 / 1024);
              originalIDPosSize = size;
          }
          else {
              totalSize  = totalSize + originalIDPosSize; 
              var size = Math.round(e.target.files[0].size / 1024 / 1024);
          }
          var remainSize = totalSize - size;
          console.log("Remain size : " + remainSize);
          $("#remain-size").text(totalSize - size);
          totalSize = remainSize;
  } 
  
  console.log("22222");
  console.log(uploadIDImage.IDPos.Files);
  </code></pre>
  
  <p>What I got from my console.log is first print "22222" and undefined and then "111111".</p>
  
  <p>Why "11111" not print first?</p>