How to execute Javascript in VS code

S1 : install node software

s2 : install VS code software

s3 : Open VS code editor. Open the extensions windows. Install two software

  •  JavaScript (ES6) snippets
  • Code Runner - By Jun Han
s4 : Open new terminal window and type "npm install prompt-sync" --->This is used to prompt user input

s5 : Type the JavaScript code as shown in the below screenshot.


s6 : There is Run button on the right side of the window. Click on it to run the program.
s7:  Console will ask for input from the user, if it is not allowing to edit then do the following open settings and type code runner and then put a check mark on that option.
s8: Re-run the program 

            


Comments

Popular posts from this blog

Understanding Collection and Object Initializer