Understanding nested for loops in JavaScript

Are you having trouble understanding nested for loops in JavaScript? Just can't get it into your head? Here's how they work:for (let outer = 0; outer < 3; outer += 1) { for (let inner = 0; inner < 3; inner += 1) { console.log('outer:', outer, 'inner:', inner); } } This prints: outer:…

Why does the page refresh when I click 'submit'?

Are you making an HTML form, and the page refreshes/reloads when you submit the form? You can prevent this with a little bit of JavaScript:<form onsubmit="(event) => event.preventDefault()"> <p>...</p> </form> The preventDefault method prevents the…

Lifestyle & Habits

When Willpower and Good Intentions Fail - or - Mastering Habits for Fun & Profit The Setup My colleague Joe gave a presentation at my employer'sinternal conference about the importance of measuring your progress towards your personal and corporate goals. He was very adamant about the importance of the OODA…

What is git?

The Basics A Git repository is just a very fancy way to store files. You can make any directory on any computer into a Git repository. Most of the time, it'll behave exactly like it's still a regular directory. But when you run the git commands, Git can keep a…

Day 150: Yummy Italian!

I've landed at Will's Riverview RV Park in Shakopee, MN, a small town just outside Minneapolis. It's a quaint, small town, with one important drawback: no local Italian places. I have to drive 30 minutes, down to Eagan (turns out Minneapolis is really a bunch of small towns in a…

Day 146: Goodbye, farm!

It's been fun visiting Kevin in Rochester, but it's time to move on. Before I go, here are a couple pictures of the farm he's on: This odd cliff is on the road leading up to the farm. I have no idea how it formed, but it's pretty neat. Onward…

Day 139: Spamity spam! Glorious spam!

Do you know what Minnesota is home to? Hormel, and the Spam Museum! Let's go! It seems this food truck is a longstanding family business. How interesting. SO MANY CANS I'll admit, even with all of my computer experience, I've never seen a sunny side up trackball before This was…

Day 138: Hooray for fixed roof!

Remember when I first arrived in Colorado, and tore a hole in my roof? Yeah, that wasn't fun. Fortunately, Kevin came over this afternoon and helped me fix it. It was a ton of work, but thanks to instructions from a mobile RV repair guy I consulted while in Fort…