I am interested in a portable way of writing a string to standard output, without implicit newlines added to the end, ideally forcing encoding to UTF-8, that works with either of...
there is none,since javascript doesnt have "system apis". JS core is limited and you need to use the api available within the environment javascript engine is running in.
My current code tries to detect where it is running, then uses a platform-specific write method. But I'd rather get rid of that.
that's the only thing you can do.
EDIT : the javascript spec is here : http://es5.github.io/ and it's short,there is 0 notion of standard output or standard input because there is no javascript standard library.