![]() The picture below shows the result of running node index.js command on the terminal:īy using Node.js, you can test run any simple JavaScript code you’ve written easilyįrom VSCode integrated terminal. Once inside the terminal, you can then run the code using node name_of_file.js command. To run the file, you first need to open the integrated VSCode terminal in View > Terminal menu command: The easiest way to run JavaScript using VSCode usually involves installing Node.js locally on your machine so that you can call the script using Node.js.Ī script called index.js with the following code:įunction factorial let n = factorial console. Sometimes, you may want to run your JavaScript code immediately inside Visual Studio Code just to see if a piece of code works. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |