To repeat a string N times in JavaScript, you can use the `repeat()` method.
In this example,
"Hello"
with the parameter 3
to repeat it 3 times.result
.const repeatedString = 'Hello'.repeat(3);
console.log(repeatedString);
HelloHelloHello
In this tutorial, we learned How to Repeat a String N Times in JavaScript language with well detailed examples.