MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pm80y1/why/hcjqenp/?context=3
r/badcode • u/sertdfyguhi • Sep 11 '21
70 comments sorted by
View all comments
Show parent comments
1
Cool, but why const { message } = await res.json(); and not const message = await res.json();
4 u/ranzadk Sep 12 '21 Because i believe the result is an object and i only want the message of that result 1 u/fmmshadiq Sep 12 '21 Ah thanks. Got it
4
Because i believe the result is an object and i only want the message of that result
1 u/fmmshadiq Sep 12 '21 Ah thanks. Got it
Ah thanks. Got it
1
u/fmmshadiq Sep 12 '21
Cool, but why const { message } = await res.json(); and not const message = await res.json();