Week two complete...
Tags: javascript, beginners, devjournal, programming
Published: 2022-04-16 19:11:09

Week 2 of my [My monthly Goals](https://dev.to/taepal467/month-4-of-my-coding-journey-1clc) is complete(well...sort of)

## What I've learned this week

- I learned about console methods that you can use when debugging JavaScript. For instance console.group() method lets you group the console.log() methods together like so:

```
console.group()
console.log(item1)
console.log(item2)
console.log(item3)
.....
console.groupEnd()
```
console.info() is used for general information

```
let color = "purple";
console.info(color);
// purple;
```
console.warn() is used for giving a warning

```
console.warn("this is a warning");
//⚠️ this is a warning
```
console.error() is used to hold errors. You can either enter a string or variable for the error method.

```
let skyColor = "pink";
console.error("sky color is not pink");
//🛑 sky color is not pink

let errorMessage = "this is an error message";
console.error(errorMessage);
//🛑 this is an error message
```

To go more into depth about other methods, they  are included [here](https://developer.mozilla.org/en-US/docs/Web/API/console)

- I learned a little bit about APIs. I did not know that the DOM(Document Object Model) is an API. Some of the APIs I read about are: **geolocation API** which tells where the user is located. **localStorage API** stores information in the browser even when the window is closed. **sessionStorage API** stores information in the browser while the tab or window is open.**history API** allows you to access items from the browsers history. And lastly **Google Maps API** which lets you add maps to your webpage.

- I completed the [FreeCodeCamp Basic Data Structures](https://www.freecodecamp.org) and OMG! I have my work cut out for me especially when it comes to multi-dimensional arrays. That was where I struggled the most.

- I learned a little bit about using NodeJS. I learned how to install [npm](https://www.npmjs.com/) packages. I learned how to use the node repl in the terminal which was pretty interesting. I also learned how to create a package.json file using the command `npm init`.

## Areas where I struggled the most

- JavaScript, JavaScript, JavaScript and did I mention JavaScript? My main struggle using JavaScript came when it was time to incorporate it in the [tip calculator app](https://github.com/taepal467/tip_calculator_app). I tried looking at other peoples code to get an idea of how to complete the calculations using JavaScript. And it seems that more people are waaaay advanced because they're using key terms and methods I haven't learned about yet. This is the first project so far from [frontendmentor ](https://www.frontendmentor.io/challenges) that I am completely stumped on. This made me realize that I have a looonnnnnggggg way to go and so much more to learn.

I think I will take a break from this project and do another one that's not too complicated. I will eventually complete the project but right now my brain needs a little mental break right after working on this project for a week(and counting).But on the bright side, at least my [project](https://taepal467.github.io/tip_calculator_app/?bill=&numberOfPeople=&amount=&total=) is displayed normally in Google AND Safari.