Ajax requests work now, but seem out of order

Testing on the server, I had console.log in each of the success
functions for the ajax requests. The numbers are coming through properly
from the server's query of the database, but the console logs below,
("Level selected:" and "All levels: " ) are printing out before the
prints in the ajax requests, and I have no idea why.