Summary: Set “workbench.action.terminal.runSeletectedText” keybinding. Refer to VScode official instructions
Set the Run selected Text In Terminal short cut.
On systems CTRL keys press: CTRL + K followed by CTRL + S. Systmes with CMD: Replace CTRL with CMD
If that does not work check out this VS Code tutorial on how to change keybindings: https://code.visualstudio.com/docs/configure/keybindings
A new window should pop up.
There should be a search bar in the new window.
Tap on it and type in: workbench.action.terminal.runSeletectedText
Set keybinding to your preference.
Refer to this VS Code tutorial for video if need: https://code.visualstudio.com/docs/configure/keybindings
Open the terminal by pressing: CTRL + `
Type node inside the terminal.
Now you try typing in some JavaScript commands in the file and sending it to Nodejs
Refer to this VS Code tutorial if having issues with VS Code integrated Terminal: https://code.visualstudio.com/docs/terminal/getting-started