The first thing I ever built
A tiny, broken project taught me more than any tutorial I finished.

I don't remember the exact day, but I remember the feeling. A page with one button, and when you clicked it, nothing happened. I stared at it for an hour.
What it was supposed to do
The idea was simple: a button that changes the page's background color. That's it. I had followed three tutorials about it and finished none of them.
The tutorials taught me syntax. The broken button taught me how to debug.
What went wrong
Looking back, the mistakes were almost funny:
- I misspelled the name of the function I was calling.
- I ran the script before the button existed on the page.
- I was editing one file and refreshing a different one.
None of these were hard to fix. They were hard to find, which is a different skill.
What I'd tell my past self
- Read the error message. It's usually telling the truth.
- Change one thing at a time.
- Take a break before you rewrite everything.
If you're curious, the fix was a single line:
document.getElementById("btn").addEventListener("click", changeColor);
It still isn't pretty, but it works, and I'm weirdly proud of it. You can find more about getting started on MDN.