Change Language


Follow Navioo On Twitter

- (unary)

Changes the sign of a signed integer.

Syntax

-number

Example

var myNumber = 3;
-myNumber; // myNumber = -3;

Remarks

Use this operator to convert a positive number to a negative number, or a negative number to a positive number.

text_javascript Navioo_docs

Ajax Javascript feed

↑ Grab this Headline Animator