I'm trying to run this script in vscode :-
#!"C:\Program Files\nodejs\node.exe"
console.log("Hello world");
And in command line I enter :-
./abc.js
Each time I run this, the cursor goes to the end of script. Whereas, I'm trying to see "Hello World" on command line. Is something wrong with the shebang line.
Also, Ques.2 Is it possible to run the script without the filename also. For e.g. in the following code :-
#!"C:\Program Files\nodejs\node.exe"
function hello(){
console.log("Hello World");
}
In command Line I would simply enter this :-
hello