Task: Destructuringresponse.body.count
.
constresponse={msg:"success",body:{count:5,data:["File 1","File 2"],},};const{body:{count},}=response;console.log(count);// 5
Here, firstbody is destructured, thencount is destructured frombody.
Thanks for reading 💙
Follow@codedrops.tech for daily posts.
Instagram ●Twitter ●Facebook
Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript
codedrops.tech
Top comments(2)
Subscribe
For further actions, you may consider blocking this person and/orreporting abuse