I copied code from a tutorial and my whole page went blank, spent 3 hours finding one missing semicolon
Last Tuesday I was at my kitchen table in Boise following a JavaScript tutorial on YouTube and I typed everything exactly like the guy did on screen. When I hit refresh the page was just white, nothing showed up at all. I opened the console and saw a red error I did not understand so I started deleting lines one by one until I found the problem. One line was missing a semicolon and the whole script stopped running because of it. Now I always check the console first before I start guessing, has anyone else had a tiny typo break everything?
Man that missing semicolon thing is SO real and it gets worse the deeper you go! Wait until you hit a spot where the code runs but does something totally wrong instead of crashing, because at least a blank page tells you something broke. Silent bugs are the worst kind because you have no red error to chase, you just sit there wondering why your numbers are off by one or your button does nothing. The console tip you picked up is good but take it one step further and learn the breakpoint tool in your browser dev tools, where you can pause the code line by line and watch what each variable actually holds. That trick would have saved you way more than 3 hours once you start writing your own stuff instead of copying tutorials. Also worth knowing that some coders skip semicolons on purpose now and let the computer add them in, which means copying code from two different styles is a great way to break everything.