Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Nodejs user input

// Importing the module
const readline = require("readline-sync");
  
// Enter the number
let a = Number(readline.question());
let number = [];
for (let i = 0; i < a; ++i) {
  number.push(Number(readline.question()));
}
console.log(number);
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Nodejs #user #input
ADD COMMENT
Topic
Name
7+7 =