How to repeat strings in JavaScript?
Originally posted here!
To repeat string in JavaScript, you can use the repeat() string method.
Consider this string,
// string
const str = "hehe";
Let's repeat this string 5 times using the repeat() string method.
// string
const str = "hehe";
//...
melvingeorge-me.hashnode.dev1 min read