'How can take input for extrnal platform ie.., boiler plate code for plain javascript

var stdin = process.openStdin();
stdin.addListener("data",function (d) {

})

Sample input:

1
5

I want take this input in my code. I can't able to write boiler plate code please help me



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source