Pot.Hash.prototype.reduce

{*} Pot.Hash.prototype.reduce ({Function} callback [, {*} initial [, {*} context]])

Pot.js で利用可能。 PotLite.js では利用できません。

Hash に対して reduce イテレートを実行します。

Hash インスタンスの要素に対して reduce イテレートを実行します。
詳細は、reduce を参照ください。

結果の値が返ります。

var object = {a: 1, b: 2, c: 3};
var hash = new Pot.Hash(object);
var total = hash.reduce(function(a, b) { return a + b; });
Pot.debug(total); // 6