basic of js
-
for each:going on every elemnt of array
-
map: hum ek new array create krke usme modification ya new mapping krwa dete hai
*filter: whenever there is a scope that we have to create a new array from our existing array , and the new arr<=arr_exist like it filters thing
*methods inspection arr_f.indexOf(9) 3
arr_f.flat(5) (6) [2, 6, 7, 9, 0.9, 5]
arr_f.indexOf(11) -1
** objecct is like key value pair
- object.freeze() so we are not able to modify our object at any cost obj.age=20 20 obj.age 19
function ki length find me the no. of para meter is the length of function
** Async:-
-
if our code runs line by line then its known as synchronous process
-
if our code is of asynchronous nature then send that code in side stack and let the nature sync code run
whenver the full sync code runs i.e. main stack is empty then check that the async code is completed or not... if completed then take it out in the mean stack and run it side stack me async code process hoga execute nhi hoga or waha process hoke vo main stack me aake execute hoga that's it
fetch()=> async in nature