function StringBuffer() {
this.__stringArray = new Array();
}
StringBuffer.prototype.append = function(str) {
this.__stringArray.push(str);
}
StringBuffer.prototype.toString = function() {
return this.__stringArray.join("");
}
var data = new StringBuffer();
data.append("A");
data.append("B");
data.append("C");
data.append("D");
data.append("123");
document.writeln(data.toString());