Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js find place value

        var ones = Math.floor(num % 10),
            tens = Math.floor(num/10 % 10),
            hundreds = Math.floor(num/100 % 10),
            thousands = Math.floor(num/1000 % 10),
            tenThousands = Math.floor(num / 10000 % 10),
            hundredThousands = Math.floor(num / 100000 % 10),
            millions = Math.floor(num / 1000000 % 10),
            tenMillions = Math.floor(num / 10000000 % 10),
            hundredMillions = Math.floor(num / 100000000 % 10);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #find #place
ADD COMMENT
Topic
Name
4+1 =