Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Click here if you want to know how to create an user input in node.js! :)

+7 votes
asked Jan 23, 2023 by codenxn (1,350 points)

There might be a shorter way, but I found this line of code, and it helped me a lot:

const readline = require('readline').createInterface({

        input: process.stdin,

        output: process.stdout

});

readline.question("What ever you want to ask\n", variableName => {

         console.log(`sup {variableName}`)

         readline.close();

});

Again, I think you can find shorter ways, but I found this on codecademy.

1 Answer

0 votes
answered Feb 3, 2023 by Prosper (150 points)
hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...