If you want to become a best developer you must need to learn some topics given below. lets discuss…..
# 1.ABOUT EVENT LOOP
Behind the scene, javascript events maintained by the event loop. It is the working process of the javascript engine.
Javascript event takes some steps for the execution of an event. These steps are Call Stack, Web Apis, Callback Queue, Event loop.
Javascript is a single-threaded language so it works one by one. When we call an event then it is going to the call stack. Call stack to maintain our event and execute an event with the LIFO data structure. If our events need more time for calculating or getting data then call stack transfer this info to web APIs for working with this. And call stack executes the next event of the stack. And besides, the web API works for that who’s need more time to calculate or process. After finishing web APIs work for the event it passes to the callback queue. Callback queue serially (FIFO) transfer executed response to call stack queue by the event loop. And then execute the code.
#2.Window.onError
We can decorate our window error. I assume that you show the error providing system by chrome developer tools. You can easily modify it as your wish. window.onError provides us 5 default parameters these are message, source, line, column, error. We can easily modify our code by using these parameters.
#3.Coding Style
When you work under a company or an organization then you are not only a developer, you need to work with your teammate. So your code must be readable, for this reason, we need to giving importance to coding style.
#4.Arrow Function and General Function
An arrow function is an updated version of the general function. It provides less code than the general function. But arrow function has not provided arguments and this method. The general function provides us arguments. Arrow function can’t duplicate parameter names.
#5.Primitive and Non-Primitive
There are two types of data in javascript primitive and non-primitive.
String, Number, Boolean, Null, Undefined are primitive data, and Object, Array, Function are non-primitive data. We can’t modify primitive data but can it to the non-primitive data type.
#6.Cross-Browser Compatibility
When we make a website then it not working all the browsers and devices properly. Because we use some latest technology and feature for a better experience and better looking, some old devices and browsers can’t support these features. So we need to work for all of our audience. Lots of browsers and devices are available in this world. No one can’t provide all smooth features to all these devices and browsers. But we can provide our all features to the maximum audience. So we will target our maximum audience device and browser and then we will work for it.
#7.Hoisting
Var is hoisted to the global scope, so we got access to a var variable from anywhere in the code.
#8.Block Binding
In javascript, every scope has created by code blocks. When we declare a Let or Const variable in scope then it is hoisted to the top of the scope. We can change and update it from this scope.
#9.Spread Operator
we need to add 3 or more previous array then we can’t use Concat() method properly then we can just use the spread operator to add multiple arrays easily.
#10.Comments
When we need to change a code for a single task then how to find our exact point to code. We can fix this problem by comment. When we implement a single functionality then we need to do a comment.