Live data from Hacker News

Node.js "preprocessor" script to log from comments

bbarrows.com

1–2 of 2 posts

Re: Node.js "preprocessor" script to log from comments

#2
Yes, I know we should all be good enough to not need to ever use console.log statements, or to even iterate for that matter but sometimes I find myself tired and working on a project and just want to double check my data structure is in the correct state. If I use console.log I risk the chance of forgetting that line of code and submitting it to LeetCode which will cause a failure. Using this comment based approach makes logging easier and is "LeetCode safe" in that no console.log statements will ever be executed.