For example, if I have a .js
file with pure JavaScript code like:
function doIt(a, b)
{
return a + b;
}
Is it possible to, within the VS Code terminal, execute the code -- just like I would in a web browsers developer tools? Is there some special terminal extension I can get that will let me do this? Hopefully something that doesn't need me to manually run/compile every time I save the file?
I am not writing Node.js
code so I don't know (think) the Node.js extensions will work.
** Update **
I don't want to just execute the script and exit/terminate. I want to execute it but keep it in memory, in the terminal window, so I can interactivly interact with it. For example, run doIt
with various parameters to see the result/output -- just like I would from the dev console in Chrome.