11.6.2 Subtraction operator -

2010-05-17

AdditiveExpression : AdditiveExpression - MultiplicativeExpression

Code: (Meta Ecma)
function evaluate(AdditiveExpression - MultiplicativeExpression) {
var lref = evaluate(AdditiveExpression);
var lval = GetValue(lref);
var rref = evaluate(MultiplicativeExpression);
var rval = GetValue(rref);
var lnum = ToNumber(lref);
var rnum = ToNumber(rref);
return lnum - rnum;
}


The left value is also called the minuend and the right value the subtrahend. It is always the case that a-b === a+(-b) (if a and b are numeric..).