Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

input from terminal node js

// npm i readline-sync
import readlineSync from 'readline-sync';

const text = readlineSync.question('enter text:');

const password = readlineSync.question('password:', {
  hideEchoBack: true // The typed text on screen is hidden by `*` (default).
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #input #terminal #node #js
ADD COMMENT
Topic
Name
9+7 =