What is the best or most concise method for returning a string repeated an arbitrary amount of times?
The following is my best shot so far:
function
Use Lodash for Javascript utility functionality, like repeating strings.
Lodash provides nice performance and ECMAScript compatibility.
I highly recommend it for UI development and it works well server side, too.
Here's how to repeat the string "yo" 2 times using Lodash:
> _.repeat('yo', 2) "yoyo"