9. populateSelectMenu a. Depends on the createSelectOptions function we created b. Receives the users JSON data as a parameter c. Selects the #selectMenu element by id d. Passes the users JSON data to createSelectOptions() e. Receives an array of option elements from createSelectOptions f. Loops through the options elements and appends each option element to the select menu g. Return the selectMenu element

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 22E
icon
Related questions
Question

Need help with these Javascript functions please!

9. populateSelectMenu
a. Depends on the createSelectOptions function we created
b. Receives the users JSON data as a parameter
c. Selects the #selectMenu element by id
d. Passes the users JSON data to createSelectOptions()
e. Receives an array of option elements from createSelectOptions
f. Loops through the options elements and appends each option element to the
select menu
g. Return the selectMenu element
NOTE: The next functions use Async / Await to request data from an API. We cover this in
Week 13. I do not recommend proceeding beyond this point until you have completed the
learning module for Week 13.
10. getUsers
a. Fetches users data from: https://jsonplaceholder.typicode.com/ (look at
Resources section)
b. Should be an async function
c. Should utilize a try / catch block
d. Uses the fetch API to request all users
e. Await the users data response
f. Return the JSON data
11. getUserPosts
a. Receives a user id as a parameter
b. Fetches post data for a specific user id from:
https://jsonplaceholder.typicode.com/ (look at Routes section)
c. Should be an async function
d. Should utilize a try / catch block
e. Uses the fetch API to request all posts for a specific user id
f. Await the users data response
g. Return the JSON data
12. getUser
a. Receives a user id as a parameter
b. Fetches data for a specific user id from: https://jsonplaceholder.typicode.com/
(look at Routes section)
c. Should be an async function
d. Should utilize a try / catch block
e. Uses the fetch API to request a specific user id
f. Await the user data response
g. Return the JSON data
Transcribed Image Text:9. populateSelectMenu a. Depends on the createSelectOptions function we created b. Receives the users JSON data as a parameter c. Selects the #selectMenu element by id d. Passes the users JSON data to createSelectOptions() e. Receives an array of option elements from createSelectOptions f. Loops through the options elements and appends each option element to the select menu g. Return the selectMenu element NOTE: The next functions use Async / Await to request data from an API. We cover this in Week 13. I do not recommend proceeding beyond this point until you have completed the learning module for Week 13. 10. getUsers a. Fetches users data from: https://jsonplaceholder.typicode.com/ (look at Resources section) b. Should be an async function c. Should utilize a try / catch block d. Uses the fetch API to request all users e. Await the users data response f. Return the JSON data 11. getUserPosts a. Receives a user id as a parameter b. Fetches post data for a specific user id from: https://jsonplaceholder.typicode.com/ (look at Routes section) c. Should be an async function d. Should utilize a try / catch block e. Uses the fetch API to request all posts for a specific user id f. Await the users data response g. Return the JSON data 12. getUser a. Receives a user id as a parameter b. Fetches data for a specific user id from: https://jsonplaceholder.typicode.com/ (look at Routes section) c. Should be an async function d. Should utilize a try / catch block e. Uses the fetch API to request a specific user id f. Await the user data response g. Return the JSON data
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning