Here is an interesting question, in javascript what is the best way to convert a positive integer into a string of multiple zeros? For example 3
will be convertd to '000'
, 7 will be converted to '0000000'
.
I guess I can use a plain old for loop but it just seems to be too cumbersome to me.