console.log
function writes to stdout
. It will automatically append a line break at the end of the printed data.
For more advanced use cases, Bun exposes
stdout
as a BunFile
via the Bun.stdout
property. This can be used as a destination for Bun.write()
.
See Docs > API > File I/O for complete documentation of
Bun.write()
.