The right hand operand (right of the assignment operator) is executed only once. Simply because it's a function call, which returns an object. That return value (the object) is assigned to the variable... or at least a reference to that object is being assigned.
The ECMA specification is quite clear about this, in its own way, of course):
The production AssignmentExpression : LeftHandSideExpression = AssignmentExpression is evaluated as follows:
Let lref be the result of evaluating LeftHandSideExpression.
Let rref be the result of evaluating AssignmentExpression.
[skipping 3 & 4]
Call PutValue(lref, rval).
As you can see, the right hand expression is evaluated first, then the value to which the expression was resolved is assigned.
That's the reason why you sometimes see code like this:
var someFunctionWithElements = (function(elem1, elem2)
{
return function(val1, val2)
{
elem1.val(val1);
elem2.val(val2);
};
}($('#foo'), $('#bar')));
The closer created here is being passed 2 DOM references (wrapped in a jQ object). This way, the DOM isn't travered each time we call the somFunctionWithElements function...