https://compiletab.com/reduce-javascript/
Understanding reduce() method in Javascript(with examples)