I
I
IvankoPo2017-04-08 20:55:57
JavaScript
IvankoPo, 2017-04-08 20:55:57

How to enter a string into the console?

Using the simple-twitter module, I wrote a simple script that creates a tweet with the specified text in quotes. But I want to implement it so that when the script is run from the console, it would output console.log("what tweet to write"); and I would enter my string into some variable, so what is the method to enter strings and numbers into variables in node.js? I know that in js there is a confitm prompt, but they interact in the browser.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2017-04-08
@IvankoPo

process.stdin.read();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question