DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
add leading zeros javascript
const str1 = '5'; console.log(str1.padStart(2, '0')); // expected output: "05"
PREVIOUS
NEXT
Tagged:
#add
#leading
#zeros
#javascript
ADD COMMENT
Topic
COMMENT
Name
2+1 =
Submit