Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

moyenne javascript

function ArrayAvg(myArray) {
    var i = 0, summ = 0, ArrayLen = myArray.length;
    while (i < ArrayLen) {
        summ = summ + myArray[i++];
}
    return summ / ArrayLen;
}
var myArray = [1, 5, 2, 3, 7];
var a = ArrayAvg(myArray);
console.log(a)
Comment

PREVIOUS NEXT
Code Example
Javascript :: input tag data fetch html javascript 
Javascript :: react useState update object in array of objects 
Javascript :: JSON requests using API in Javascript 
Javascript :: form submit jquery 
Javascript :: slice string javascript 
Javascript :: Angular p-dialog 
Javascript :: what is angularjs 
Javascript :: what is undefined in javascript 
Javascript :: sort array ij js 
Javascript :: await vuex dispatch true 
Javascript :: buscar una frase e un string js 
Javascript :: find the max number in an array js 
Javascript :: jquery add url parameter to link dynamically by class 
Javascript :: mongoose read 
Javascript :: javascript array de imagenes 
Javascript :: find option values using javascript 
Javascript :: iis express gzip 
Javascript :: node api return file 
Javascript :: add new array at the back of react state 
Javascript :: js extract boolean from string 
Javascript :: how to print hello world in javascript 
Javascript :: pagination.js cdn 
Javascript :: how to use react fragment 
Javascript :: abstract class in js 
Javascript :: angular 11 support versions nodejs 
Javascript :: use localstorage react hook 
Javascript :: javascript split text after x characters 
Javascript :: angular singleton service example 
Javascript :: react document viewer 
Javascript :: setstate 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =