Returns the sign of a number, indicating whether the number is positive, negative, or 0.
Syntax
Math.sign(number)
Remarks
The required number argument is a numeric expression for which the sign is needed.
The return value is one of the following:
NaN, ifnumberisNaN.-0, if
numberis -0.+0, if
numberis +0.-1, if
numberis negative and not -0.+1, if
numberis positive and not +0.
Requirements
Supported in Microsoft Edge (Edge browser). Also supported in Store apps (Microsoft Edge on Windows 10). See Version Information.
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.1.


