Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript number is negative or positive

Math.sign(num); //sign of num: if num is negative,–1; if positive, 1; and if it is 0, 0
 
PREVIOUS NEXT
Tagged: #javascript #number #negative #positive
ADD COMMENT
Topic
Name
6+5 =