menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
Can someone explain this question & answer to me? var list = [11, 35, 6, 0]; var sum = 0; for (var i = 0; i < list.length; i++) { sum = sum + list[i]; } sum = sum/list.length; console.log(sum);
asked
Apr 6, 2024
192k
views
1
vote
Can someone explain this question & answer to me?
var list = [11, 35, 6, 0];
var sum = 0;
for (var i = 0; i < list.length; i++) {
sum = sum + list[i];
}
sum = sum/list.length;
console.log(sum);
Computers and Technology
high-school
Rmlan
asked
by
Rmlan
8.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
The code iterates through the list of numbers and adds them up.
The sum is then divided by the length of the list to get a percentage.
The code will iterate through the list of numbers and add them up.
The sum variable is then divided by the number of items in the list to determine the average value.
Soren Stoutner
answered
Apr 10, 2024
by
Soren Stoutner
7.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jan 22, 2024
68.0k
views
What is the output of the following code snippet: if( 1 == 1){ var x = 6; } console.log(x); Select one:a) undefined b) Error c) 6d) 66
Benjamin Anderson
asked
Jan 22, 2024
by
Benjamin Anderson
7.8k
points
Computers and Technology
high-school
1
answer
5
votes
68.0k
views
asked
May 6, 2024
69.2k
views
What does the syntax look like for a 'for' loop when attempting to individually log three array items into the console? ex: var animals = ['bear', 'deer', 'owl']; //to create output: //bear //deer //owl
Chef Gladiator
asked
May 6, 2024
by
Chef Gladiator
7.7k
points
Computers and Technology
high-school
1
answer
3
votes
69.2k
views
asked
May 9, 2024
158k
views
Var x = [20, 35, 15]; insertItem(x, 2, 7); appendItem(x, 40); removeItem(x, 1); console.log(x); What is the output of the code below?
George Ananda Eman
asked
May 9, 2024
by
George Ananda Eman
8.0k
points
Computers and Technology
college
1
answer
2
votes
158k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org