Document.write() error

Hi,

I am currently following this tutorial: https://www.youtube.com/watch?v=023Psne_-_4

However, when I try to link the javascript file to the html file, putting the following in the body:

script src=“app.js” async></script

it also happens when I don’t add async to the linking script.