Callbacks and Promises
Callbacks and Promises
;;w
→
→
④ .
JS is
single threaded 4¥
three
^°§¥%ÉÉm
still thread
guns =
counters ,
how to connect to intend how render
,
and control
webpages etcetc_
Rambin
y①tm
÷.gy•
case 2
"
"
enka
browse
YE
,
features to
node__
Pme ②
⑥
@
⑨ frat
GW
bacbd_⑤
☒÷ ☐☐
queue -
µ#①¥☒
first can
first-season
? → event
loop
⑥0
Kentqueue__ callstah
line native code
JS will line
by enecute the .
native
anything apart from
The moment JS sees
does
then it the
following -
do to send
→ IS
just one
operation which is
euentquu-u.SN will
eneculy keep on the code &
enutqueu
will wait till the time one call stack
/ global
code is
yet
to be
cempkhd
Crimen
strings
two
*
check
if they are
anagram of
each
otuen.EE listen I
sielentl
n-
yay
Shy
→ mirin tÉ¥
HE ne_
¥
am →
occuuueefchnss.co#
the
swigs same
µ÷k 0¥ 10¥30
Matrintraiural mere
problem moaning
quietest ha③__
Ef quickest
this & new → Kannan
Gupta
this →
outhit
& Arnab
event
loop gave
→
Private → Firth
I → { 3 -
empty obs
②
w@==
→
①
•
✗ ✗
③→ this hottie
assign newly
④ 4 U bushmen fair
✓
the
if
thi ,
Price : 'm
is not
returning an
object
srelimtaisoiaemreku1@obyutaf.s
this .
disuen.io
p.m.in
••%
am .
,
callbachs _a
what are
him
+
g cb,
asy odd
=É÷:"
Boulud done
startcaprersylaprenia.de
startuploady
sueufillfufdeed
h
feuulicn 4ile_
Promise
=
Promises enhancer (
are
readability thy enham Hu
code a
bi¥
these but special once they get returned
are
objects
immediately when we make a runtime env
fend call
funk display
l
( data )
Effi
data÷ asy
.
law
s
w¥fd
"
C
fetch www.abc.cai)
"
=
hltp.tl ;
plaited
promise
. then ( display ) ;
Guizot
fd variable will be
story
a
poamohyt-_
So does & an oilseed
promis
2
thugs ,
one inside
gs
SS i. eountiw .
'
outer
fund
will to
1) It the call the
give
env .
2) it
gives placeholdera to the variable in the
not
completed ,
value well be
undefined but
as soon
fetch is
completed the result
of
stored
the
fund call will be in his
value
property
of turf
② on
fulfillment this is : an
array ;
Now as soon
as
fetch is completed & value property
gets me
enact
response ,
we one
by one start
enecuty
the
functions present in this
array
with value
property as
argument
who
fills this
array
?? So this
forms object has
=
pass inside
" "
then
fine also wheaten
funen
"
a we
,
a / Flack
0
2
euutq=_
0
2
task this halls all we call back
]→ enmity
micro
9¥ of promise
micro taste
gum
has
hyhm¥f