Node.js code for STDIN and STDOUT without using any library

Program