.repeat() in String
I came across a coding question where I was required to repeat #
for n number of times. e.g. ######
Thanks to this particular question, I was able to find out that such an API existed and certainly has helped me with the question.
One example usage would be (from MDN):
And for my particular case, to repeat #
6 times, all I needed to do was: