Print Help Text
NodeJS
Easy
3 views
Problem Description
If --help is passed, print usage text for a CLI.
Output Format
Print multiple lines.
Constraints
Simple usage output.
Official Solution
const help = process.argv.includes('--help');
if (help) {
console.log('meetcode-cli');
console.log('Usage: node app.js --topic node --level easy');
process.exit(0);
}
console.log('run');
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!