Simple Logger Function
NodeJS
Easy
3 views
Problem Description
Write a small logger that prefixes time and 'meetcode'.
Output Format
Print two lines.
Constraints
No external libraries.
Official Solution
function log(message) {
const t = new Date().toISOString();
console.log('[' + t + '] meetcode: ' + message);
}
log('start');
log('done');
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!