Calculate mean/average using .reduce() | JavaScript Fundamentals

preview_player
Показать описание
Learn how to calculate the average of a set of numbers using JavaScript with a step-by-step example, including a refactor using the higher order function .reduce().

Background music courtesy of Fesliyan Studios

Learn JavaScript with CSX:

Connect with me on Twitter:
Рекомендации по теме
Комментарии
Автор

very good mate! this helped me at my course exercices

TheIgor
Автор

Great! Just what I was looking for! btw cool hat! I just finished Codesmith JS Prepcourse it was great, definitely a lot of talented people.

ChrisTian-oxnr
Автор

thanks for this, useful. what if you're unable to access array.length for whatever reason? is there a way you can think of to get the array length within the scope of reduce()?

JohnBartmannMusic
Автор

how would it look like if I wanted to add keys from multiple arrays?

xxxxxataraxiaxxxxx