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
siniylev [52]
3 years ago
6

Write a JavaScript function named countUp( ), which displays 1 to 10.

Computers and Technology
2 answers:
castortr0y [4]3 years ago
6 0

Answer:

class countUp {

 constructor() {

   for (let i = 1; i <= 10; ++i) {

   console.log(i);

    }

 }

}

const count = new countUp();

Explanation:

To solve the problem we create a class called countUp with the main method called constructor, inside constructor we have a for loop that iterates from one to ten increasing the variable i by one after each iteration, inside the for is a console function to print the numbers from one to ten one at a time. Note that for this program to work we need to instantiate the class countUp using the variable count.

Ann [662]3 years ago
3 0

Answer:

Following are the code in javascript

<html>

<body>

<button onclick="countUp()">Try it</button>

<script>

function  countUp()

{

var i;

for (i = 0; i <=10; i++)

{

document.write(i) ;

document.write("<br>") ;

}

}

</script>

</body>

</html>

Explanation:

In this program when we click on button " Try it " it call the javascript function countUp( )  which display the value from 1 to 10.

output

1

2

3

4

5

6

7

8

9

10

You might be interested in
The /tmp directory is a temporary directory and will not exist on a system at all times. True or False?
jeka94

Answer:

False.

Explanation:

The /tmp directory is a directory that contains files that are required temporarily and also for temporary storage of data.The data inside the /tmp directory gets deleted when the system boots or shuts down.Since the directory exists permanently the content inside it is temporary.

So we can conclude that the answer is False.

5 0
3 years ago
Cyber security includes which of the following?
Law Incorporation [45]

Answer:

d. All of above

Explanation:

All answers are correct!

5 0
4 years ago
Primary memory consists of the various devices that are able to store data and programs even when the power is off. true or fals
balu736 [363]

Answer: I think its true but I'm not like 100% sure sorry

Explanation: i dont know just seems right

6 0
3 years ago
Which of the following best describes the protocols used on the Internet?
max2010maxim [7]

Answer:

D: The protocols of the Internet are open and used by all devices connected to the network

Explanation:

There are billions of devices connected to the Internet, and hundreds of different kinds of devices: laptops, tablets, phones, refrigerators, handheld credit card readers, and so on. Protocols (standards) ensure that the variety of devices interact with each other smoothly.  There are a lot of protocols! The Internet was designed with several layers of abstraction that sort the protocols according to what part of the process they support.

5 0
3 years ago
Which two keys are commonly used to move or insert data?.
vlabodo [156]

Answer:

control and shift

Explanation:

6 0
3 years ago
Other questions:
  • Which option organizes tasks based on importance?
    12·1 answer
  • Produce definition in computer
    12·2 answers
  • Why should you need to have skills and an understanding about programming?
    8·1 answer
  • IF ACCURATE = BRAINLY (if u answer rubbish randomness= reported AND if you got questions dont ask in answer slot= reported)
    13·1 answer
  • The Windows Remote Desktop Web connection that allows users to connect to a work or home computer and access files is considered
    7·2 answers
  • If you wanted to buy a house that cost $150,000 and you knew you needed a down payment of five percent, how much would you need
    8·1 answer
  • Impact of information technology in the society​
    11·1 answer
  • Can you guys give some samples of STEM-related studies?​
    7·2 answers
  • Select the correct text in the passage.
    12·1 answer
  • Given the following class, Book, Write code for the following:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!