![]() |
|
|
+ Search |
![]()
|
Apr 4th, 2008 21:17
ha mo, Mark Szlazak, Richard Lowe, JScript message board at 4GuysFromRolla
One way of getting a white space string is with the following function.
function space(cnt) {
return (new Array(cnt + 1)).join('');
}
var whiteSpaces = space(10000);
A similar function could be used to get a string of repeating
substrings.
function repeats(str, cnt) {
return (new Array(cnt + 1)).join(str);
}
var str = repeats('hi ', 100);
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com