Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

two digit js'

var myNumber = 8;
var formattedNumber = ("0" + myNumber).slice(-2);
console.log(formattedNumber);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #digit
ADD COMMENT
Topic
Name
4+1 =