Phase - 1 Recap
Tags: javascript, beginners, productivity
Published: 2022-08-29 09:50:44

What a journey this has been. I find myself finishing up phase 1 of the online boot camp I've started. It wasn't an easy path but I'm happy to say that I'm almost done and moving on to Phase-2. With that said. I want to talk about my journey through phase-1. I’ll of course start with my favorite sections of phase-1 since that is the easiest to talk about. However, before I start, I would love to give you my background knowledge on coding. I’m very new to coding. I just started a couple months ago as I was challenged with completing the prework of the boot camp that let’s me get a grasp of whether I find the material enjoyable. I of course did find the material both enjoyable and challenging. It was stressful at first since I was learning to program with no prior experience. I felt as I was learning to walk when I was so used to crawling for so many years. Don’t get me wrong, I’m educated and have a challenging job, but coding stimulates your brain in challenging ways that has me feeling both excited and stressed out. The last time I felt this way was when I would attend chess tournaments. Chess can be a hard game to grasps. You have to learn how to move the pieces. Then you have to learn how to move the pieces correctly. Then you have to learn about tactics and opening principles. Then finally once you’ve accomplished that, you’ll put it all together and try to think five to ten moves in advance just to outwit your opponent. I laugh now when my father would always say that you can relate chess to anything. Well right now, I’m learning how to move the pieces correctly when it comes to coding and yes it’s both fun and exhausting, but I’m committed to grow and become a stronger “chess player.” Now coming back to phase-1, it was jam packed with a lot of material that gave me information, videos, and labs to help me grasp the knowledge. My favorite part had to have been Array Iteration. Although it is challenge, it was very neat to know that you could use things such as Map, Filter, and for each to adjust what you were trying to use your arrays for. Although, I didn’t think I would use it much, I ended up using For each and Filter in my Project for phase-1. It’s so interesting to see how you can filter in or out code to show specific types of data on your website. I used this to filter an API to show specific data that was typed out. Filter, according to the program I’m in, is searching through an array and returning values called on. For example, having an array of 1,2,3 and filtering to show only numbers greater than 1. The answer would then be 2 and 3. Filter is a fund method to use for different types of arrays that you’ll work with in the future. Although filters are pretty simple to understand, the array iteration that I found most difficult was Mapping Arrays. According to our program, mapping arrays transforms elements in an array to another value. The example that is used in our program has an array again of 1,2,3. We can map this array by calling it back as a function and passes each element in the array to that callback. The example used calls the function a num and multiplies it by num causing 1 to be 1, 2 to be 4, and 3 to be 9. Our readings also say that filter and maps are similar in that they return new arrays. However, map returns a new array with the same length as the original array while filter returns a subset of the original array. Below I’ll provide images of the examples I explained above. There were other exciting and challenging parts to phase-1. As friends and instructors have told me, practice makes perfect when it comes to coding and improving your knowledge with the various types of codes I'll be working with in the future. I’m excited to move on to phase-2 where I will be learning about React. My goal is to continue reviewing the materials I’ve learned in phase-1 and apply it to practice so I can one day be a well rounded “chess player” I look forward to more readings, group discussions, and lectures that will enhance my ability to code and complete the next phase in this program!

Map Example:
[1, 2, 3].map(function (num) {
  return num * num;
});
// => [1, 4, 9]

Filter Example:
function colorFilter(collection, color) {
  for (const user of collection) {
    if (user.favoriteColor === color) {
      console.log(user.firstName);
    }
  }
}

colorFilter(users, "Red");
// LOG: Kate