filmov
tv
padStart and padEnd methods | String Object In JavaScript

Показать описание
🎁 Join my channel to get access to perks:
🧡 Hello All JavaScript Lovers Outhere!
Today you're going to learn about the String Object In JavaScript.
This tutorial is a series of videos, in each video we will discuss a method (or more) of the String Object in JavaScript.
In today's video, you're going to learn about the padStart, and padEnd methods.
The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string.
The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.
🔷 Syntax :
padStart(targetLength)
padStart(targetLength, padString)
padEnd(targetLength)
padEnd(targetLength, padString)
🔹padString : The string to pad the current str with. If padString is too long to stay within the targetLength, it will be truncated from the end. The default value is the unicode "space" character (U+0020).
🌍 Social Media Links.
💲 Suppport the Channel
🧡 Hello All JavaScript Lovers Outhere!
Today you're going to learn about the String Object In JavaScript.
This tutorial is a series of videos, in each video we will discuss a method (or more) of the String Object in JavaScript.
In today's video, you're going to learn about the padStart, and padEnd methods.
The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string.
The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.
🔷 Syntax :
padStart(targetLength)
padStart(targetLength, padString)
padEnd(targetLength)
padEnd(targetLength, padString)
🔹padString : The string to pad the current str with. If padString is too long to stay within the targetLength, it will be truncated from the end. The default value is the unicode "space" character (U+0020).
🌍 Social Media Links.
💲 Suppport the Channel
Комментарии