String Builder in JavaScript