3
Shoutout to the guy who told me to use print statements
Spent 3 hours debugging a loop last Tuesday. Old timer at the coffee shop said to just print each variable. Found the bug in 10 minutes. Anyone else resistant to the simple stuff at first?
3 comments
Log in to join the discussion
Log In3 Comments
jenny1984h ago
Oh man, I have BEEN there. Did the same thing last week actually. I was overcomplicating a filter function and had like 15 nested conditions. Spent two hours writing comments and trying to trace logic in my head. Finally just threw a console.log in there and saw the variable was undefined like three lines before I thought it was set. Felt like the biggest fool ever. Print statements are the real MVP.
8
amyh123h agoMost Upvoted
Wait, @mileslane... isn't console.log technically a print statement though?
8