For this exercise you will create another Hello World program. However, unlike the last exercise, this program must be able to be executed directly by the operating system.
Create a JavaScript file to act as a Node.js program named direct-exec.js
. The file
should contain JavaScript code to output the phrase "Hello, World. I was executed without the 'node' command!" to the terminal through the stdout stream.
Expected:
$ ./direct-exec.js
Hello, World. I was executed without the 'node' command!