Taking off the training wheels

Sometimes, this is what it feels like without an instructor by your side to walk you through why something is (or isn’t) working.

Week 3 was a doozy guys. In 24 hours, I was going from a mental high because I answered a problem that had taken me 6 hours — to an all-time low because we moved on to something I didn’t understand. That, my blog-friends, is the essence and beauty of being in a coding school. The ideas that you didn’t understand at all last week, are now so apparent and logical- you can’t NOT know them. And the materials that you’re going through this week… well, you’re kinda like homeboy up there ^^.

We started out Monday with going through the Document Object Model (AKA my boy, ‘DOM’). It’s a tree-like structure that represents the current HTML document. For each element DOM finds, it creates what is called a ‘node’ which is just a cute word for a JavaScript object. We then dove head first into using our JavaScript to write our HTML. — “Wait, what?! You can do that?!” (My words verbatim last weekend.)

Heck yes you can!

So then we moved onto event listeners, which allow developers to respond with interactive behavior and to events that occur on the DOM. For example, let’s say that when a user clicks a button, we want to display the date. Check out this little snippet!

Credit: w3schools.com

In our HTML, we have a button named ‘myBtn’ that when a user clicks, the date is displayed. BOOM! Pretty cool, huh?

We also went through a section on ‘template literals’, which can get a little crazy — but for now, let’s just look at a simple expression:

Credit: css-tricks.com

In this example, we are declaring the variable ‘name’ to return the string ‘Ryan’. Next, we’re telling the computer to log (write out) the string using the variable. The time that this saves developers is IMMENSE! This is also how those dumb spam e-mails are always able to say ‘Hi Crystal!’ instead of something generic :)

We are working our way into algorithms next, which I’ve always viewed as a buzzword in the development world. I can’t wait to dive in!

Week 4 — On your mark, get set, GO!

Much love ❤