Access variable outside jQuery

Access variable outside jQuery

I am reading the content of a text file using get.
The question is how to access that content outside jQuery function.

The code is:

  1. var dt = null;
  2. $.get('myfile.txt', function(data, status) {
  3.         dt = data;
  4.         alert("alert 1 = " + dt);
  5.    }, "html");

  6.  alert("alert 2 = " + dt);
the first alert shows the correct content of the file, but the second one shows NULL.

What shall i do in order to get the content file outside jQuery?
Sorry if this question is too simple/obvious.

Thanks a lot for your time.