Files
kotlin-fork/js/js.translator/testData/box/native/print.js
T
2016-09-29 12:00:42 +03:00

25 lines
398 B
JavaScript
Vendored

var buffer = "";
function writeToBuffer(a) {
var type = typeof a;
if (type !== "string") throw Error("Expected string argument type, but got: " + type);
buffer += a;
}
function writelnToBuffer(a) {
writeToBuffer(a);
writeToBuffer("\n");
}
var GLOBAL = (0, eval)("this");
GLOBAL.console = {
log: writelnToBuffer
};
GLOBAL.outputStream = {
write: writeToBuffer
};