Code to go logo
Created using Figma
Use Cases
Contribute
How to repeat a string in JavaScript
Strings
By Jad Joubran ·
Last updated Aug 16, 2020
const string = "Code"; string.repeat(3);
"CodeCodeCode"
Aug 16, 2020
1
Jad Joubran
See answer
1
Jad Joubran
String.repeat
on MDN
Learn JavaScript step by step