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
Eva8 [605]
3 years ago
12

Write a setInterval() function that increases the count by 1 and displays the new count in counterElement every 300 milliseconds

. Call clearInterval() to cancel the interval when the count displays 5.
var count = 0;


var counterElement = document.getElementById("counter");


counterElement.innerHTML = count;



/* Your solution goes here*/
Computers and Technology
1 answer:
Alina [70]3 years ago
8 0

Answer:

  1. var count = 0;
  2. var counterElement = document.getElementById("counter");
  3. counterElement.innerHTML = count;
  4. var a = setInterval(
  5.    function(){  
  6.        count++;
  7.        counterElement.innerHTML = count;
  8.        if(count == 5){
  9.            clearInterval(a);
  10.        }
  11.    }
  12.        , 300);

Explanation:

The solution code is given from Line 6 - 15.  

setInterval function is a function that will repeatedly call its inner function for an interval of time. This function will take two input, an inner function and the interval time in milliseconds.  

In this case, we define an inner function that will increment count by one (Line 8) and then display it to html page (Line 9). This inner function will repeatedly be called for 300 milliseconds. When the count reaches 5, use clearInterval to stop the innerFunction from running (Line 11 - 13).  

You might be interested in
Help ASAP
Gelneren [198K]

Answer:

By supplying a variety of charts and graphs to present the information in best way.

By tracking and analyzing the data

By conveying large amount of numerical data in more understandable format.

Explanation:

You need to know the limitations of Excel software. You will find that it does not support more than 3 variables while analyzing. However, if you use analytic software like Tableau and Microsoft Power BI then you can use a lot number of variables. And this is done through graphs and charts, and the other variables apart from x, y, z are the colors, shades. etc. Even color alone can add a good number of variables, and hence you can understand. Thus, you will be able to query better. Queries become better if you have more variables. And charts and graphs always present the information in the best way/ Also you can track and analyze the data. And through it conveying a large amount of numerical data in a more understandable format is made possible, and this is definitely quite helpful. Hence, all of the options mentioned above are helpful. But they do not do complex calculations and complex queries in fact.

4 0
2 years ago
Read 2 more answers
Read the following scenario what type of business letter do you think is required in this situation?
grandymaker [24]

Answer:

Cover letter

Explanation:

The type of business letter Melissa and Melrose would need to write is a Cover letter.

The Cover Letter is usually not more than a page document which gives a kind of summary or hint about who individual is and the quality of the individual, while highlighting why an individual is the best fit for the role they are seeking for.

Most recruiters usually make use of the cover letter, as a first hurdle, to screen out applicants especially when applications are much.

Melissa and Melrose, in addition to the resume they would submit for the volunteering job, would need a cover letter.

8 0
2 years ago
Read 2 more answers
I want to discard my old computer and securely erase the data from my hard drive.
FrozenT [24]
Wipe off the hard drive with a software eraser but it won't be quick and won't work on defective disks
3 0
2 years ago
__________ refers to excavating the sides of an excavation to form one or a series of horizontal levels or steps, usually with v
Nutka1998 [239]

The answer is Benching.

Benching and sloping are methods used to protect employees working in excavations from cave–ins. Benches are cuts in the slope that provides protection by removing material at an angle to its floor. They give the slope a stair-step appearance with emphasis on the angles; the flatter the angle, the more the protection. Benches are split into two groups: simple and multiple.

6 0
3 years ago
Read 2 more answers
A written guarantee to fix or replace an item is called a _____.
VladimirAG [237]
A warranty is a statement given by the manufacturer or other company
3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with a
    13·1 answer
  • What would be some long- term goals.
    11·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • An undesirable jagged appearance is referred to as
    7·2 answers
  • Select the best answer for the question. 2. What is the simplest way to permanently get rid of an unwanted file?
    13·1 answer
  • Which information is considered free for use?
    9·2 answers
  • HIPAA requires the following controls for medical records: A. Encryption of all data B. Technical safeguards C. Physical control
    12·1 answer
  • You are working with an online tech service to fix a problem with installation of a program on your machine. You grant them remo
    13·1 answer
  • Data mining requires specialized data analysts to ask ad hoc questions and obtain answers quickly from the system. select one: t
    12·1 answer
  • The terminology used to describe a possible path to resolution to a problem from one end to the other is called what?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!