+ 7
How to get data of the users from received array using fetch ()
Hi Everyone! Please I need your help! The task is following. 1.Get the data of all users using fetch is done. 2.Output the lastnames of all users. 3.Output the users whose last name begins with F. Requirements. The data can be retrieved once. Items 2-3 can be done in one place, the output is devided by console.log('-----')console.log('Item 1'). The problem is the following. I am trying to implement each item in a separate async function. Can't fulfill the second, third items. How to refer to array received by the first function? https://code.sololearn.com/Wkf6DveA0BUq/?ref=app
5 Respostas
+ 2
https://code.sololearn.com/WdR67AYRWMEU/?ref=app
+ 2
If you wanna do it with 3 async calls (don't really know why):
https://code.sololearn.com/WH5XnUZBVJm7/?ref=app
+ 2
Thanks a lot, Artur, the code is well stuctured, cool! 😊 Спасибо огромное!
0
Why you return console.log() on first function? You should return the array of lastnames.
0
You're welcome :)