0% found this document useful (0 votes)
6 views3 pages

Chaining Promises in JavaScript

Uploaded by

rounakbhowmick
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Chaining Promises in JavaScript

Uploaded by

rounakbhowmick
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Page No.

Dato

hainingYomises
tiest we need to cote hyeejs90 file as
uigijson [Link] 'shoun-ison'
in úgisopWEit follouling(ode

Hxt":"high", "auHhag":"luigi"j
" t " ddnce","authos" üs

inmaEiajson wH follouwing /ode_


"HKt""wGHR "authoe":maÉo"Y
"Sing"authoe: "nasio"
"x+": "pa"quthag" : "maeig"

in "shaun:son WEK_6lloding (od

"tat"" Pat" "auHhot" "Shaun"1


"Hxt" "Sung" "guhoe": "shoun"
eKt" "(tiA""aukhog" : "shaun"

Now k_brlou(ode iniauoscit_


file
Page No.

Date

Const getTodos =(1¬s0U7e) =7


ttun_ARu iunise L(stslue,ttet) =Y
Cost 1tquRst =ne_XuLHHHpRequist0
eguest addEuntlistnee(hcaduyotaHchonge' ) =*
if[rquestoxeady~tok=z=t equeststobs=10o)L
(onst dotd=[Link](que st: 1esponseText )
golue (dota)_
else if (eQut xeadyótuk===

1Rquestopern("GET'RSOUHCe);

getTodas( Iugijson')then[dato =>


([Link] (p1omise solued:doto)
RHn qetfodos('ma ('[Link])
then_(duta
[Link] ("imise 2 Ysolutd:"data);_
Tetvsn het Todas ("shauNison');_
3):hEn Ldsta
([Link](ppomise tsolued:doto)

(onSole.lo4punise qeettd:",e£e)

pomise solrd: ( ) L41}4-2)

psumise 3 1esolued 9 1629


(Paga No.
Dato

thee,qood. ing bout (Hth 0t tnd is


it (tchts Iny lEeots0 we dont have_
to eeuiitk_tog Pue then

(onsidegal codeSone speuious


Onluhan is
I qive ong. SoULLE_in
2ttu£n getTodos("[Link]'
we Gpell in(eGtHy

And ouw Re belou 0ufput

Dromise 5olued: () 41,4A441


GET http 4o (Yot toUnd
PNomise RiecHed :eEEOF getting soce

You might also like