Hello, I am a complete beginner to js/html/css and I have no idea what I'm doing. I don't really understand what node.js is but I got it because I was having problems running js at all without it. I use vscode.
I'm trying to make a separate file for all my javascript, and am linking it to my html via:
<script src="script.js"></script>
and I am visualizing my html + css with the vscode liverserver extension, however, when I try to run my js file I get ReferenceError: document is not defined
(the code is only trying to grab an html element so far: var originalLine = document.getElementById("line-0");)
I tried googling and stack overflow, but I don't understand what they're talking about in the image I attached.
How do I get my javascript file to recognize the html document and its elements? I think it has to do with nodejs but like I said before, complete beginner I have no clue what anything is or what's happening.
If anyone could help me out I'd seriously appreciate it 🙏
it might be so obvious but I don't see it