Skip to main content

Write to stdout

还没翻译译自英文(bun.com)本页 4 段都还没译

The console.log function writes to stdout and appends a line break to the printed data.

console.log("Lorem ipsum");

Bun also exposes stdout as a BunFile with the Bun.stdout property. Pass it as the destination to Bun.write().

await Bun.write(Bun.stdout, "Lorem ipsum");

See Bun.write().

Traducción © 2026 fanyi.dev · Original © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)