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
List the steps you took to configure SERVERC and take a screen shot of the Connect to DNS Server dialog box by pressing Alt+Prt
Oksi-84 [34.3K]

Answer: Main Steps are as under;

1. Add servers to the server administrator • On the SVR-MBR-C computer, click All Servers.

2. After installation right click all servers icon, the SVR-MBR-C restarts.

3. On the Active tab and the selected Adatum domain, click Find Now Select the SVR-DC-A server and click the arrow and Search results. The server appears in the selected list.

4. In SVR-MBR-C, in Server Manager, click Manage> Add Roles and Features.

5. The Add Roles and Features Wizard appears, showing before you begin

6. Add AD DS as Roles.

7. 7. Promote the server after adding roles to a domain controller

8. After installation SVR-MBR-C restarts.

Explanation:

Main Steps are as under;

1. Add servers to the server administrator • On the SVR-MBR-C computer, click All Servers.

2. After installation right click all servers icon, the SVR-MBR-C restarts.

3. On the Active tab and the selected Adatum domain, click Find Now Select the SVR-DC-A server and click the arrow and Search results. The server appears in the selected list.

4. In SVR-MBR-C, in Server Manager, click Manage> Add Roles and Features.

5. The Add Roles and Features Wizard appears, showing before you begin

6. Add AD DS as Roles.

7. 7. Promote the server after adding roles to a domain controller

8. After installation SVR-MBR-C restarts.

6 0
4 years ago
Questione
umka2103 [35]

Answer:

According to my physics all of functinalitys are made of angles and binary code to perform a new formula and involved to each sides....

Explanation:

HOPE IT HELPS!!!i translate into G your language

5 0
3 years ago
................,...
docker41 [41]

Answer:

there's a comma

Explanation:

after all those periods

6 0
4 years ago
One way bloggers decide how to present information is by understanding
PSYCHO15rus [73]

I would say strong use of multimedia.

4 0
3 years ago
Read 2 more answers
Web and mobile applications are programs in which all or some parts of the software are downloaded from the web each time it is
Ber [7]
True,because a browser requires a constant connection to internet to get its information for the what ever the program is. and mobile devices now these days requires you to be login to your mobile stores in order to play or download your program.
8 0
4 years ago
Other questions:
  • You’re responsible for an always-on VPN connection for your company and have been told that it must utilize the most secure mode
    12·1 answer
  • Vanessa and Marie are best friends. Vanessa tells Marie that one of their classmates has been posting nasty comments about Vanes
    10·2 answers
  • Computers store temporary Internet files in the Recycle Bin. These files take up space and slow down a computer. Which tool can
    10·1 answer
  • Windows XPProfessional and Windows Vista Both have same devicedrivers.<br> True<br> False
    5·1 answer
  • The purpose of validating the results of the program is Group of answer choices To create a model of the program To determine if
    12·1 answer
  • List three ways security could be improved for taking the prepared deposit monies to the bank?​
    11·1 answer
  • Write a method that accepts a string as an argument and returns a sorted string. For example, sort("acb") returns abc. Write a t
    6·1 answer
  • Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing the value of a counting variable by a factor of two in ea
    15·1 answer
  • You need to secure your wireless network. which security protocol would be the best choice
    10·1 answer
  • As you continue to build the help desk, you want to ensure that all of the tools are in place and that the analysts have the too
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!