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]
3 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]3 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
Jamie is not sure a new medication will work because it has not had a large test group. Is Jamie being creative?
Mumz [18]
No, they're being skeptical.
4 0
3 years ago
Read 2 more answers
CODING TIME
Fynjy0 [20]

Answer:

food_list = ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

one_more = ['meat']

extend_list = food_list + one_more

print(extend_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'meat']

food_list.append('milk')

print(food_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'milk']

food_list.insert(0, 'cake')

print(food_list)

Output : ['cake', 'rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

flowers = ['rose', 'hibiscus', 'lily']

flowers.remove('rose')

print(flowers)

Output : ['hibiscus', 'lily']

To remove rose using pop()

flowers.pop(0)

Explanation:

The + operator and append method adds elements to the end of an existing list item.

The insert method adds element at the specified index

Remove method deletes element by stating the name of the element to be deleted while pop deletes element using the index value of the element.

7 0
2 years ago
Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guz
Aleksandr [31]

Answer:

The following code is written in java programming language:

//set if statement

if (((modelYear >= 1999) && (modelYear <= 2002) && (modelName == "Extravagant")) || ((modelYear >= 2004) && (modelYear <= 2007) && (modelName == "Guzzler")))

{

recalled = true;    //initialized Boolean value

}

else      //set else statement

{

recalled = false; ////initialized Boolean value

}

Explanation:

Here, we set the if statement and set condition, if the value of modelYear is greater than equal to 1999 and less that equal to 2002 and modelName is equal to "Extravagant" or the value of modelYear is greater than equal to 2004 and less than equal to 2007 and the model year is equal to "Guzzler", than "recalled" initialized to "true".

Otherwise "recalled" initialized to "true".

5 0
3 years ago
Convert 2910 to binary, hexadecimal and octal. Convert 5810 to binary, hexadecimal and octal. Convert E316 to binary, decimal an
Burka [1]

Answer:

2910 to binary = 101101011110

2910 to hexadecimal = B5E

2910 to octal = 5536

E316 to binary = 1110001100010110

E316 to octal = 161426

E316 to decimal = 58134

5916 to binary = 101100100010110

5916 to decimal = 22806

5916 to octal = 54426

010010102 to decimal = 149

010010102 to octal = 225

010010102 to hexadecimal = 95

FOR 438 and 618, 8 is not a valid digit for octal..

5 0
3 years ago
What solar panel alternative is used at kramer junction? 
siniylev [52]
A 150-megawatt solar power plant.

4 0
3 years ago
Other questions:
  • Theresa is a certified teacher. She just had a baby and would like to stay home, but still wants to teach. Which career would be
    11·2 answers
  • Write a new program called Lab7D that will read strings from a text file and turn them into "encrypted code". Create a bool func
    14·1 answer
  • "Hubs:
    9·1 answer
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
  • Que se trata el RUC<br>​
    11·1 answer
  • PLSSSSS HELPP!! Population biologists are concerned about invasive species such as the zebra mussel found in North American wate
    7·1 answer
  • What is the best way to pay for college?
    9·2 answers
  • How did Bill Gates benefit from free enterprise? Need a paragraph please. Will give the branliest!!
    9·1 answer
  • Write a program that reads in exam scores and displays the average score and the high score.
    9·1 answer
  • Once you fix the bug in a code, what is the last thing you should do?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!