DSA Motivation: Click here
- DSA Course notes on Gist: Click here
- Learn Algorithms: Click here
Lovely Answers: Click here
Input reading libraries:
-
inquirer (17.1k*)
-
readline-sync (750*, and its archived on github)
-
Using native readline via async code. Source: nodejs docs - Accept-input-from-the-command-line-in-nodejs
const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout, }) const read = () => new Promise((resolve) => readline.question(``, resolve)) const main = async () => { console.log(await read()) readline.close() // This is not redundant! // do your programming stuff here! console.log('program code here....') } main()