Positive value (+) (Operator/unary)

Indicate positive value or numeric cast a non-numeric value.


ECMAScript edition - 2
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Netscape Enterprise Server version - 2.0
Opera - 3.0
Property/method value type:Number primitive
JavaScript syntax:-+anOperand
Argument list:anOperandA value that can reasonably be converted to a number

The operand is evaluated and converted to a numeric value.

A positive value is unchanged.

A negative value is unchanged.

A string value will be converted to a Numeric value and replaced in context.

Although this is classified as a unary operator, its functionality is really that of an additive operator.

The result will be the value of the operand, cast to a Numeric type.

See also:Additive operator, Unary operator


ECMA 262 edition 2 - section - 11.4.6

ECMA 262 edition 3 - section - 11.4.6