DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js num to string with leading 0
String(<number>).padStart(<places>, '0') String(42).padStart(5, '0'); // '00042'
PREVIOUS
NEXT
Tagged:
#js
#num
#string
#leading
ADD COMMENT
Topic
COMMENT
Name
1+3 =
Submit