Here's some text inside the HTML file, which is what initially downloads and displays on the page -- but then REALLY FAST, as soon as the JavaScript file downloads and the web browser runs the JavaScript code, all the text inside the body element of this HTML file gets replaced with a new message.
(And it happens faster than you can even blink your eyes! So you won't notice the change unless you have a really slow internet connection.)