31
Pro tip: My 'for' loop finally clicked after I tried it with a list of my favorite movies
I was stuck for days until I wrote a loop to print each title from a list I made. Seeing 'The Matrix' pop up in the console made the whole concept make sense instantly. Has anyone else had a moment where a simple, personal example made a tricky idea clear?
3 comments
Log in to join the discussion
Log In3 Comments
the_hannah1mo ago
My first real "for" loop printed out a list of my exes. It was a short program, but it ran perfectly. The console output was a brutal lesson in both coding and my dating history. What's the weirdest list you've ever used to test a concept?
2
davis.gavin1mo ago
Tested a sorting algorithm with my grocery list. Watching "milk, eggs, bread" get alphabetized felt oddly satisfying.
7
thomas.piper18d agoTop Commenter
Hold on, are we really calling a for loop a "brutal lesson"? My first loop printed out the evolution of my music taste from bad to less bad and it was just a list of bands I don't listen to anymore. Feels like dating history is taking itself a little too seriously for something that's basically just a few console.logs. Isn't it just data that happened to be about people, not some deep existential program?
8