Reputation: 1548
stdout.write()
I mostly use this function when I don't want the newline() after message. I know about print() but with the output, it also adds newline by default. stdout.write() don't add newline but I think it can't be used on browsers, it only works on dart VM.
So please can anyone show me how to achieve the same output as stdout.write() for browser-based work.
Upvotes: 0
Views: 57
Reputation: 76223
print use console.log
in browser so you cannot write text without newline (this behaviour is enforced by browser not Dart).
You can use a StringBuffer to append text without newline and call print(mybuffer)
when you're ready to output your full line.
Upvotes: 1