Answers for "Dynamic Value pass through Command Line"

0

Dynamic Value pass through Command Line

const prompt = require('prompt');

prompt.start();

prompt.get(['username', 'email'], function (err, result) {
    if (err) { return onErr(err); }
    console.log('Command-line input received:');
    console.log('  Username: ' + result.username);
    console.log('  Email: ' + result.email);
});

function onErr(err) {
    console.log(err);
    return 1;
}
Posted by: Guest on August-09-2021

Code answers related to "Dynamic Value pass through Command Line"

Code answers related to "Javascript"

Browse Popular Code Answers by Language