Answers for "how to find avererage of obj properties using reduce method"

3

reduce average javascript

function average(nums) {
  	// nums.length is the important part
    return nums.reduce((a, b) => (a + b)) / nums.length;
}
Posted by: Guest on December-08-2020
0

how to find avererage of obj properties using reduce method

function average(nums){
return nums.reduce((a,b)=>(a+b)/ nums.length;
average([[1], [2], [3]]);
Posted by: Guest on September-18-2021

Code answers related to "how to find avererage of obj properties using reduce method"

Code answers related to "Javascript"

Browse Popular Code Answers by Language