Cannot run JS code in VS Code anymore!

Hi guys

I used to be able to run code in VS Code so I can test as I go

Now I can’t seem to do it and the ‘code runner’ plugin is greyed out, and I have no idea why

Can anyone help?


It doesn’t seem to be for me; are you sure it isn’t working? One suggestion I have is to put the JS into an HTML document, and run it from there. Simply put your JS between the <script> tags, and open the HTML file in a browser:

<!DOCTYPE html>
//javascript code can go here. 

To do this, create an HTML file by using the file extension .html in VSCode, then write the above code in the HTML file, and put your JS between the <script> tags. Save the HTML file, and open it. If there are console.log()s in your code, inspect the browser window to see the result of them. To run the code again, just reload the page.