So, my question has been asked by someone else in it\'s Java form here: Java - Create a new String instance with specified length and filled with specific character. Best so
I would create a constant string and then call substring on it.
Something like
var hashStore = '########################################'; var Fiveup = hashStore.substring(0,5); var Tenup = hashStore.substring(0,10);
A bit faster too.
http://jsperf.com/const-vs-join