Padding Strings in JavaScript

# Introduction In this lab, we will explore the `pad()` function in JavaScript. The `pad()` function allows you to pad a string on both sides with a specified character to achieve a certain length. We will learn how to use the `String.prototype.padStart()` and `String.prototype.padEnd()` methods to achieve this.

|
60 : 00

Click the virtual machine below to start practicing