logo
Search
showing results for - "javascript average of arguments"
Ricardo
26 Aug 2018
1const average = (...args) => args.reduce((a, b) => a + b) / args.length;
2
3// Example
4average(1, 2, 3, 4);    // 2.5
source
similar questions
javascript find average of numberscomo acrescentar item no array jsreduce average javascriptjavascript biggest numberjavascript average of float arrayaverage of numbers in list javascriptcalculate average in javascriptaverage of an array jsjs find higher value in arraygetting average of array javascriptfunction that return shortest of words in the given array jswhat does the mean in javascriptget average and sum javascriptcalculate average javascriptfunction that search a biggest value in array javascriptjavascript get minimum value in arrayhow to calculate average of array in javascriptjavascript median of arraywhat is shortest javascript programget percentage of number javascriptwhat does 22 1 22 mean in javascriptpercentage formula in javascript
queries leading to this page
javascript method to get average of numbersaverage jsreduce averagejavascript function that calculate average of arrayfunction calculateaverage 28numbers 29 7b const and letjs average of arrayjavascript average of argumentsaverage function jsfonction js averageaverage javascriptjavascript mean of arraymath average javascriptjavascript average of arguments
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue