Visual studio code problem

sir java script file is not opening in visual studio code while only html file is run fine but when i open an html file with java script file it is not open . Please help me .I try on you tube but it would not help me

What is the issue exactly can you be more descriptive and make sure the file is ending with .js

yes sir my file is ending with .js

Are you seeing any error or vscode is not opening?

No it is not showing any error simple single html file is open in browser but when i link .js file in html file it is not open in browser.

Can you share code with me or github repo of it?

Which folder has this issue?

java script when i open html page in which it .js file is linked .When i open with live server nothing happen

visual studio is not showing any error .

It is because you are not doing anything with HTML DOM in javascript files. DOM is what we see on our web page and if you want to see what console.log is showing.
Open file in Chrome
Right click on it
Go to inspect element
click on console
And it will show you everything you are console logging

Sir i am understand that browser should show a blank page. But browser is not open when i run file with live server.

chrome is not open when we run file with live server

You don’t need to run it in server just open html file in chrome

Means i open file from where i save it in disk.

Yeah just open it in chrome

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.