Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

4.8. Input with readline-sync¶

/*Gathering input from the user requires the following setup:*/

const input = require('readline-sync');

let info = input.question("Question text... ");

// example // 
const input = require('readline-sync');

let name = input.question("Enter your name: ");
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Input
ADD COMMENT
Topic
Name
9+1 =