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.

How to input in javascript

+8 votes
asked Jan 28, 2025 by ??? (200 points)

3 Answers

0 votes
answered Jan 30, 2025 by Peter Minarik (101,420 points)
0 votes
answered Jan 31, 2025 by Admin (5,870 points)

For Javascript (Node), you may take input like using syncprompt module.

var prompt = require("syncprompt");
var name = prompt();
console.log('Hello ',name);
0 votes
answered Feb 21, 2025 by AHMED HAMID (140 points)

let name = prompt("Enter your name:");

console.log(Hello, "  +  name);

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...