1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
leva [86]
4 years ago
5

Define a JavaScript function named showGrades which does not have any parameters. Your function should create and return an arra

y containing 3 Numbers. The values for each of these entries should be: get the value from the div whose id is "GradeA" and store it at index 0 of your array; get the value from the div whose id is "Passing" and store it at index 1 of your array; and get the value from the div whose id is "Learning" and store it at index 2 of your array. Your must then encode the array as a JSON blob and return that JSON blob.
Computers and Technology
1 answer:
grandymaker [24]4 years ago
8 0

Answer:

see explaination

Explanation:

//selective dev elements by id name

var gradeA = document.querySelector("#GradeA");

var passing = document.querySelector("#Passing");

var learning = document.querySelector("#Learning");

//function showGrades

function showGrades() {

var arr = [];

//converting string to int and inserting into array

arr[0] = parseInt(gradeA.textContent);

arr[1] = parseInt(passing.textContent);

arr[2] = parseInt(learning.textContent);

//creating json blob

var blob = new Blob(new Array(arr), {type:"text/json"});

return blob;

}

You might be interested in
Why are digital signals an accurate and reliable way to record and send information?
Oduvanchick [21]

Answer:

A wave that has been digitized can be played back as a wave over and over, and it will be the same every time. For that reason, digital signals are a very reliable way to record information—as long as the numbers in the digital signal don’t change, the information can be reproduced exactly over and over again.

Explanation:

6 0
2 years ago
Write a function that finds the number of occurrences of a specified character in the string using the following header: def cou
Ludmilka [50]

Answer:

def count(userInput, character):

   occurrences = 0

   for character_in_string in userInput:

       if(character == character_in_string):

           occurrences += 1

   return occurrences

userInput = input("Enter string: ")

character = input("Enter character: ")[0]

print(count(userInput, character))

Explanation:

  • Define a count function that takes in the userInput as a string and character parameters.
  • Loop through the userInput and check whether selected character is equal to the character found in the string.
  • Increase the counter of occurrences by 1 if the condition is true and then return the occurrences.
  • Take the userInput and character as input from the user.
  • Finally display the results by calling the count function.
6 0
3 years ago
An HP PC does not support the HP System Board Configuration tool, and you must use the HP System Board Replacement and System Di
GuDViN [60]

Answer:

Press F2 to see if the System Diagnostics or Hardware Diagnostics UEFI menu displays.

Explanation:

Start the HP BIOS Setup utility and view the Advanced > Diagnostics screen for supported diagnostics.

Boot to Windows and launch HPSA. Search for HP PC Hardware Diagnostics UEFI.

All HP commercial products manufactured after 2009 have HP PC Hardware Diagnostics UEFI installed on the hard drive.

7 0
3 years ago
Which original VPN protocol is supported by most platforms but offers low levels of security?
Masja [62]

Answer:

vpn

Explanation:

PPTP is the least secure. ...

L2TP/IPsec is a good VPN solution for non-critical use; however, this protocol, like PPTP, has been compromised as well. ...

Across many areas of the IT world, OpenVPN is easily the best all-around VPN solution.

7 0
2 years ago
The jaws of ________ chucks are advanced and retracted independently of each other and allow for fine-tuning the position of the
harkovskaia [24]

The correct answer for this would be wood(chucks)

4 0
3 years ago
Other questions:
  • In your opinion, what is the best practice for organizing files within your computer?
    15·2 answers
  • What range of leakage current must trip an IDCI?​
    15·1 answer
  • You are using a wireless client adapter with a site survey utility and a notebook computer to perform a manual site survey in a
    7·1 answer
  • How do you recognize the brand name of a drug in the package insert?
    15·1 answer
  • You’re browsing the internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    11·1 answer
  • If you are interested in working for a specific company, what type of job site should you look at for opening?
    15·2 answers
  • A pre-design document you can use to create a new project quickly
    5·1 answer
  • Help, I'm a beginner in coding! I have to write a quiz. You don't have to get all fancy and stuff, since I'm a beginner lol. I w
    12·1 answer
  • Need answer ASAP
    14·1 answer
  • What happens if the new context is in memory rather than in a register set and all the register sets are in use?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!