String padStart() and padEnd()
Widely availableThe padStart()
and padEnd()
methods of strings return a string lengthened to a minimum number of characters by adding characters to the start or end of the string.
The padStart()
and padEnd()
methods of strings return a string lengthened to a minimum number of characters by adding characters to the start or end of the string.