Create Javascript Function Named Displaydata Two Parameters First Parameter String Contain Q37119906

Create a

JavaScript

function named

display_data

that has two parameters. The first

parameter will be a

String

containing a JSON blob like the function in part 1returns. The

second parameter will be a boolean.

Start by using the JSON library to convert the firstparameter into a usable JavaScript Object.

Next get the HTML element whose

id

is

“data”. This HTML element is a

div.

If the second parameter is equal to

true

​, write the value associated with theObject’s

“total”

key into the

div

. If the second parameter is equal to

false

, write the value associated with the

Object’s

“average”

key into the

div

Examples are also not possible for this problem. Sorry,again!

After completing this part of the lab exam you shoulddownload the repl as a

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.