VSC error: document is not defined

Got this error in VSC when I edited my javascript and attempted to run it. Both VSC and Chrome declare that “startquiz” is not defined, even though I wrote the function out for it.

Any idea on what I did wrong?