need to be pointed in the right direction regarding writing/running JavaScript in Visual Studio, since I got my feet wet into programming using Visual Basic. I'm in the process of applying for a bootcamp in NYC and part of the application process includes an interview in which I may have to demonstrate a tiny bit of JS. I know it is traditionally run in web browsers but if I can also do it within the familiar environment of the IDE i learned in that would be amazing. (I have Visual Studio versions 2015 and 2019.)
Thanks!
If your just writing some simple JavaScript you want to see in a browser, wrap it in html and name the file index.html, use windows explorer to navigate to the folder holding the index.html wrapper and .js, double click on the index.html and it should run in your browser.
open a text editor and save the following as index.html. script.js is the name of your JavaScript file in the same folder as index.html, you can change the title to whatever you want.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Console demo</title>
<script src="script.js" defer></script>
</head>
<body></body>
</html>
Inside visual studio 2022 you could do the same html wrapper and open a terminal window, navigate to the folder and run ".\index.html"