Skip to main content
Deno.stdout.write - Deno documentation
method Deno.stdout.write
stdout.write(p: Uint8Array): Promise<number>

Write the contents of the array buffer (p) to stdout.

Resolves to the number of bytes written.

It is not guaranteed that the full buffer will be written in a single call.

const encoder = new TextEncoder();
const data = encoder.encode("Hello world");
const bytesWritten = await Deno.stdout.write(data); // 11

Parameters

p: Uint8Array

Return Type

Promise<number>
Back to top