Understanding JS concepts: Part 2

Prathmesh Dhatrak's Blogs
Search for a command to run...

Prathmesh Dhatrak's Blogs
No comments yet. Be the first to comment.
So this is a series of blogs I'm starting regarding Frontend Development concepts. In each part, I will try to explain 5 Js concepts or common javascript questions. I am creating these blogs to understand and write about the concepts in detail. So t...
The other day I was talking to one of my seniors and he asked me is your JavaScript strong and do I understand how javascript works under the hood. So I was confident that I had watched the Philip Roberts "JSConf" video (which BTW is very awesome vid...

As a front-end developer, you may have encountered a situation where you need to make API calls in a React application, but you want to avoid making too many calls at once. This can happen when you have an input field that makes an API call every tim...

When to Use Them and Why They're Still Relevant

So this is a series of blogs I'm starting regarding Frontend Development concepts. In each part, I will try to explain 5 Js concepts or common javascript questions. I am creating these blogs to understand and write about the concepts in detail. So t...

So In each part, We will cover 5 Js concepts.
Note:- I am creating these blogs to understand myself and write about these different and important concepts in detail.
So to start we will see some of the basic Js concepts.
In JavaScript, there are three primary data types, two composite data types, and two special data types.
All the other Data types can be understood by their name just the difference between Null and Undefined is complicated.
There are three types of errors:
There are three distinct phases an event goes through:
Events (such as ‘click’ events, for example) are registered not only by the target element where they originate but by all of that element’s parents all the way up to the global element (i.e. the Window/Browser).
An Event occurs (a ‘click’, for example) and the click event is registered (this means noted and recognized by the browser).
The registered click event then goes from the Window Object down through the child elements and is registered on each during a ‘Capture Phase’ (<html> –> <body> –> <div> –> <form> –> <button>, for example) to find the Target Element (i.e to find what element was clicked).
Once the click event has registered on the Target (‘Target Phase’), it then bubbles back up the DOM Tree (‘Event Bubbling Phase’) and is registered on all parent elements up through the Window Object triggering any Event Listeners or Handlers in the process.
use strict in JavaScript.use strict is a way to voluntarily enforce stricter parsing and error handling on your JavaScript code at runtime.
Code errors that would otherwise have been ignored or would have failed silently will now generate errors or throw exceptions. In general, it is a good practice.
Key benefits of strict mode
That's it from my side. I hope this was helpful! let's connect on Github or LinkedIn.