<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <h1>Hello World2</h1> <script>src="index.js"</script> </body> </html>
I then right-click my HTML file and click open with live server as I have the addon installed. But when I check the console on chrome I can’t see anything there.
If I try and run the code using visual studio codes terminal, by typing $node index.js I get this error:
+ $node index.js + ~~~~~~~~ Unexpected token 'index.js' in expression or statement. + CategoryInfo : ParserError: (:) , ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken
I’ve removed adblocker from chrome as well.
I am completely dumbfounded and have no idea how to fix this. Any help would be amazing.