Javascript Week-4

Hi everyone, welcome to the fourth article about my experiences, lessons, projects, and challenges from this second week. This blog is divided into six sections, so you can focus on the parts that interest you:

  1. Things learnt this week.

  2. Steps I followed.

  3. Problems encountered.

  4. How I solved those problems.

  5. Projects made this week.

  6. Resources used.

1. Things Learnt this Week

As we completed the Tic-Tac-Toe game last week . This week I dived into some advanced concepts of Javascript like Classes and Objects , then learnt about callbacks, callback hells, promises and promise chaining and finally ended with how Async Await is better than call backs and promises.

We can say in terms of code cleanliness:- Async Await > Promise Chaining > Callbacks

Classes and Objects:- Although not used more frequently in Javascript but we can say it is an example of inheritance in javascript too. It’s like a factory can produce many cars from same blueprint where the factory is classes and the cars are objects. We can use this concept in cases where we needed same type of data multiple times for different people.

Callbacks:- It is basically passing functions as argument to other functions (don’t use paranthesis ) otherwise it will start execution instead of calling.

Promises:- Promises is for eventual completion of task .It is an object in Javascript . It do the same task as callbacks but it’s just easier to understand and maintain. We use catch and then keywords for it.

Async Await:-It’s a better approach then both callbacks and promise chaining as it makes the code very neat and most modern codes uses async await in the code.

2. STEPS I FOLLOWED

As usual, I began by watching tutorials on Udemy and YouTube, then moved on to the MDN documentation because it's important to read the material too. I would watch tutorials, code along with them, and take notes while learning from the MDN documentation. My Tip :- Creating some basic code along the way is a good way to practice and truly understand how the code works.

3. PROBLEMS ENCOUNTERED:-

  1. Getting Confused with Syntax: The confusion that comes with syntax still continues like last week, will try to remember and create more small projects.

  2. Lack of Confidence : There is lack of confidence because the syntax and concept in itself feels new and confusing

Understanding the concept*: Since these are some advanced concepts of Javascript ,having a clear understanding about the code in itself is becoming tougher.

4. HOW I SOLVED THOSE PROBLEMS:-

  1. Getting Confused with Syntax: I took a pen and paper and tried writing it out myself. I think more coding will definitely make me more comfortable with the syntax.

  2. Lack of Confidence: I spent more time analyzing the events triggered and tried to learn them like a story, which helped me a lot.

  3. Understanding the concept:- Advanced topics take some time to sink in ,but they will get familiar as I will use them more and more in future.

5. PROJECTS MADE:

PROJECTS MADE THIS WEEK:

You can find all the source codes on my GitHub profile, "JanwinAditya."

This work there was no major project but some code snippets representing

  1. Classes and Inheritance :- Its based on inheritance and classes in Javascript.

  2. Api fetching:- Its on how to retrieve usefull information and convert a Json file into usable format

  3. Promises:- A simple code snippet representing execution of promises in Javascript.

6. RESOURCSE:-

  1. UDEMY

  2. YOUTUBE

  3. MDN JAVASCRIPT DOCUMENTATION

  4. STACK OVERFLOW