Published on January 26, 2024By DeveloperBreeze
const numbers = [10, 15, 20, 25, 30];
const average = numbers.reduce((acc, curr) => acc + curr, 0) / numbers.length;
console.log('Average of Array Elements:', average);
const numbers = [10, 15, 20, 25, 30];
const average = numbers.reduce((acc, curr) => acc + curr, 0) / numbers.length;
console.log('Average of Array Elements:', average);
Comments
Please log in to leave a comment.