The $(document).ready() method only waits for the DOM to load, it doesn't wait for stylesheets, images, and iframes. The DOMContentLoaded event fires once the DOM has loaded, so you'll only see "Hello World!" in the console after the method has started running.