The padStart() Function is used to place a given character at the beginning of the String.
<html>
<body>
<script>
var x = "Hello"
var y = x.padStart(10, "*")
document.write(y)
</script>
</body>
</html>
In the above code, we have declared a String Hello.
x = "Hello"
Then we have used the x.padStart(10) function to allocate 10 blocks. Then fill the left side with five 0s shifting the String Hello to the right.
y = x.padStart(10)
-Function1.png)