Learn how to run JavaScript files in the terminal or from the command prompt by using the NodeJs runtime environment. JavaScript is a scripting language for making web pages interactive that means it’s interpreted in the browser only. Therefore you can only run js file in the terminal if only you have NodeJs installed on your computer. So we first…