Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript adding zeros to the beginning of a string

const number = 5;

number.toString().padStart(2, '0');
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Javascript #adding #zeros #beginning #string
ADD COMMENT
Topic
Name
7+5 =