answersLogoWhite

0

How you add first 20 even numbers using javascript?

Updated: 8/20/2019
User Avatar

Wiki User

10y ago

Best Answer

var sum = 0; for (var i = 0; i < 20; i++)

{

sum = sum + i * 2;

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you add first 20 even numbers using javascript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the first 100 even numbers?

The first 100 even numbers are: 2 468101214161820222426283032343638404244464850525456586062646668707274767880828486889092949698100102104106108110112114116118120122124126128130132134136138140142144146148150152154156158160162164166168170172174176178180182184186188190192194196198200.


First 100 even numbers?

The first 100 whole, even numbers are: 2468101214161820222426283032343638404244464850525456586062646668707274767880828486889092949698100102104106108110112114116118120122124126128130132134136138140142144146148150152154156158160162164166168170172174176178180182184186188190192194196198200.


Sum of first 50 even numbers?

The sum of the first 50 even numbers is 2,550.


What is the sum of the first 10000 even numbers?

The sum of the first 10,000 even numbers is 100,010,000.


What are the first 5 even numbers?

Even numbers are numbers that are evenly divisible by 2. The first five even numbers would be 2, 4, 6, 8, and 10.


What is the sum of the first 100 even numbers the sum of the first 5 even numbers is 2 4 6 8 1030?

The sum of the first 100 even numbers is 10,100


Find the sum of first 10 even numbers?

The sum of the first 10 even numbers is 110.


What is the sum of the first 300 even numbers?

Te sum of the first 300 even numbers is 90,300.


What is average of first 100 even numbers?

The average of the first n even numbers is n+1, so 101.The average of the first n even numbers is n+1, so 101.The average of the first n even numbers is n+1, so 101.The average of the first n even numbers is n+1, so 101.


All even numbers from 2-100 using algorithm?

102


Find the sum of first 20 even numbers. sum?

The sum of the first 20 even numbers... is 110


The sum of the first 30 positive even numbers?

The sum of the first 30 positive even numbers is 930.