padStart and padEnd in JavaScript | ECMAScript 2017 New Features

preview_player
Показать описание
The 'padStart' and 'padEnd' methods in JavaScript are useful for filling extra space in your Strings. This is useful if you'd like to set a length for each item in a string-filled array in a universal way. For example, if you'd like to convert '1' to '01', it's easy with padStart!

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

thanks man great explaining :) i really need the visual way to understand it lol thanks a bunch!

johnnyholiday
Автор

Ok but what is useful for? i cant imagine even one scenario in which i use it

yofi
welcome to shbcf.ru