Commit d87ca1e6 authored by Nurasyl's avatar Nurasyl

add total arr val

parent 70b4ab9f
...@@ -50,11 +50,28 @@ ...@@ -50,11 +50,28 @@
// showResult(groupArr); // showResult(groupArr);
const groupArr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // const groupArr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let total = 0; // let total = 0;
for(let i = 0; i < groupArr.length; i++) { // for(let i = 0; i < groupArr.length; i++) {
total += groupArr[i]; // total += groupArr[i];
}; // };
// console.log(total / groupArr.length);
// function exampel(a, b) {
// let c = a + b;
// return c;
// };
// let f = exampel(10, 5);
// console.log(f);
// function getAnswer() { return prompt("Ведите что либо:") };
console.log(total / groupArr.length); // console.log(getAnswer());
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment