Debug Flag Switch
NodeJS
Easy
3 views
Problem Description
If --debug is present, print extra information.
Output Format
Print one or two lines.
Constraints
Use process.argv includes.
Official Solution
const debug = process.argv.includes('--debug');
console.log('meetcode run');
if (debug) console.log('debug: pid=' + process.pid);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!