> ## Documentation Index
> Fetch the complete documentation index at: https://bun-1dd33a4e-farm-15490b5d-test-done-error-hook.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Write to stdout

The `console.log` function writes to `stdout`. It will automatically append a line break at the end of the printed data.

```ts theme={null}
console.log("Lorem ipsum");
```

***

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()`](/runtime/file-io#writing-files-bun-write).

```ts theme={null}
await Bun.write(Bun.stdout, "Lorem ipsum");
```

***

See [Docs > API > File I/O](/runtime/file-io#writing-files-bun-write) for complete documentation of `Bun.write()`.
