simulate process.stdout.write in browser
update demos