Modern JavaScript
About Lesson

In this JavaScript lesson we are going to learn about JavaScript padStart() & padEnd(), so first let’s talk about padStart(), so padStart method pads a string with another string at the beginning, and it is a feature in JavaScript ES8.

 

 

Now let’s create an example in padStart, in here it will add d at the beginning of our text.

 

 

Let’s create an example on padEnd, so this method pads a string with another string at the end. in here it will add d at the end of our text.