Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript number format

number = 1
converted = number.toString().padStart(3, '0')
console.log(converted)
// Expected output
" 001 "
 
PREVIOUS NEXT
Tagged: #javascript #number #format
ADD COMMENT
Topic
Name
2+6 =