Move Your mouse pointer over the underlined elements to highlight the corresponding input field/table cell.

var fcnSet = $.withAggregatorFunctions(['avg', 'sum', 'count', 'max']);

$('#sum\\:0').addFormula('{{left[0] ||  30}} + doSomeCalc({{right[0]}})'); 
$('#sum\\:1').addFormula('{{left[1]}} + {{right[1]}}');
$('#sum\\:5').addFormula('{{left[5] || 50}} * {{right[5]}}');

$.setFormulae({ '#sum\\:xxx' : '{{left[xxx]}} + {{right[xxx]}}' }, 'xxx', [ 2, 3, 4 ]);
$('//[name = "agg1"]').aggregate('//[name ^= "sum"]', fcnSet.sum);

$('[name = "valY"]').aggregate('[name ^= "right"]', function(a, b) { return !a ? b : a + b; });
$('#agg3').addFormula('{{#X}} + {{agg2}}');

$('#avg').avg('[name ^= "sum"]');
$('[name = "agg2a"]').max('[name ^= "sum"]');

$('[name = "agg2"]').count('[name ^= "sum"]');

Doubleclick the operand input fields or table cells of the formulae to see the track popup.