Web features explorer

String padStart() and padEnd()

Widely available
Tags: js Groups: Strings Primitive types JavaScript

The padStart() and padEnd() methods of strings return a string lengthened to a minimum number of characters by adding characters to the start or end of the string.

Compatibility (view on caniuse.com)

Specifications

BCD data