I'm coming to Node.js from Python 3 and wondering if Node.js has something that I can use that is basically the same as Python's input for example lets say we have this code:
def newUser(user = None, password = None):
    if not user: user = input("New user name: ")
    if not password: password = input("Password: ")
    return "Welcome, your user name is %s and your password is %s" % (user, password)
# Option one
>>> newUser(user = "someone", password = "myPassword") 
'Welcome your user name is someone and your password is myPassword'
# Option Two
>>> newUser()
New User name: someone
Password: myPassword
'Welcome your user name is someone and your password is myPassword'
Can node.js do the same thing? If so how? If you have any documentation on it that would be useful also so I can just refer back their if I have any further questions. My main problem though is node.js not waiting for me to submit my reply/answer to the question like python does.