String repeat()
Widely available
The repeat()
method of strings returns the original string repeated a number of times.
To learn more, see
String.prototype.repeat() at MDN.
Compatibility
- Chrome 41 Released on 2015-03-03
- Chrome Android 36 Released on 2014-07-16
- Edge 12 Released on 2015-07-29
- Firefox 24 Released on 2013-09-17
- Firefox for Android 24 Released on 2013-09-17
- Safari 9 Released on 2015-09-30
- Safari on iOS 9 Released on 2015-09-16
Specifications
- ECMAScript Language Specification (#sec-string-objects), from TC39 (Ecma International).