Published
- 1 min read
convert single digit integer into double digit JavaScript
The solution for this is noted below
convert single digit integer into double digit JavaScript
Solution
;(5).toString().padStart(2, 0) // returns "05"
Try other methods by searching on the site. That is if this doesn’t work