String Window | NodeJS Code | How to test

I have written code in NodeJS which i want to submit but before that i want to test with custom input.

How can i accept input parameters from user. in NodeJS Just like in Java we can use Scanner to get input from user.

Can you write sample code for NodeJS which accept custom input and display it.