Array.prototype.reduce
document define_constructor
links for example codes