Sometime you have a set of data and you have to extract it in single elements then spread operator will help you.
Binder structuring your code it will became very easier to understand it and it will also become easy to determine what this is specific piece of code is doing.
For simple example let suppose that you are fetching data from http API and it will take few seconds to fetch data and make it available for our program. At this time you have to use a synchronous programming to wait for the data to be available.
Promise & Callback
Callbacks are the options that are passed into other functions as an argument which will be executed later. For example if you have a function that adds two number and you passed a callback within that function then that callback will be executed once the the main function had been executed. By staying main function I mean that adding of two numbers.
Maths is a collection of elements in which all the elements are stored in a key-value pair. Every element have a key and a value pair. Key is used as identifier and value pair contains the data. If you have used some no SQL database is then you will have an idea of how key, value pair store data. It is very beneficial data structure.
Also Read: – How To Make JARVIS In Python 2021