After many years, I'm finally trying to learn Javascript instead of avoiding it. Something that seems basic that I'm having a hard time getting a good tutorial for is a simple loading screen. When my home page is loaded, I need to make 4 ajax calls to get JSON data and store them in localStorage. I simply want to display a loading screen while these calls are being made, and when they are finished, show the UI. How could I do this and insure that all 4 were loaded?