Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add zero in front of numbers javascript

function checkTime(i) {
    if (i<10) {i = "0" + i};  // add zero in front of numbers < 10
    return i;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #front #numbers #javascript
ADD COMMENT
Topic
Name
6+6 =