February 2018
Intermediate to advanced
298 pages
8h 22m
English
padEnd is similar to padStart. The difference, as the function name says, is that it'll append the supplied padding string to the end of the string.
Consider the following examples again:
'normal'.padEnd(7);'1'.padEnd(3, '0');'My Awesome String'.padEnd(20, '*');''.padEnd(10, '*');'Hey!'.padEnd(13, 'But this is long');
The output for this is:
"normal ""100""My Awesome String***""**********""Hey!But this "
Read now
Unlock full access