Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

função que retorna uma media aritmética javascript

let average = (array) => array.reduce((a, b) => a + b) / array.length;
console.log(average([1,2,3,4,5]));
Source by www.it-swarm.dev #
 
PREVIOUS NEXT
Tagged: #retorna #uma #media #javascript
ADD COMMENT
Topic
Name
9+3 =