DEV Community

Cover image for [Flatiron SE] Day 2: 08/29/24
Brighton Smith
Brighton Smith

Posted on • Edited on

[Flatiron SE] Day 2: 08/29/24

Howdy everyone! Feesh back again!

Today was a very interesting day. I learned many things that were completely new to me, which is gonna be very helpful! Even though I did struggle a bit of some of them, I was able to figure it out in the end with the help of my instructor and my fellow students!

For Looping

I did already know a bit about "For Each" looping, but "For Of" and "For In" were very new, how ever they weren't that complicated. For Of was just used as a simple way to iterate over iterables like so...

for (variable of iterable) {
  // code block to be executed
}
Enter fullscreen mode Exit fullscreen mode

...very simple. And For In was a bit more complicated, letting you also control enumerable objects. It was very hard for me to wrap my head around.

Communicating with the Server

Now this was the big one, I officially got to learn how to use servers to send and control data. The most useful use I got out of this was learning how people access publicly available API's (huge one for me because I LOVE data). I will say, I really really struggled with fetch() for some reason. I eventually figured it out, I was just struggling with how it interacted within a function.

To explain, usually you can run Fetch() in the console of a website via this command...

fetch("url to a api database")
Enter fullscreen mode Exit fullscreen mode

...but I was just not able to understand how to do it. I did end up finding out it works just like above, I was just overthinking the process. Which is a pretty silly issue I have. But I'm glad I figured it out!

Big O Notation

Last thing I want to talk about is Big O Notation. This was super interesting to me just because of all the different ways to optimize code and the best way to do it. After learning more about it I decided to do my own research and it seems like Big O Notation is incredibly important in any coding scenario. So I will be sure to make sure I can use it to optimize when ever possible.

Here's a pretty cool chart I found to visualize it!

Image description
[Source:https://www.bigocheatsheet.com]

But thats everything for today! Once again thank you to Flatiron and everyone that supports me!

Cya!

Top comments (0)