diff --git a/docs/guides/binary/typedarray-to-string.md b/docs/guides/binary/typedarray-to-string.md index 9c5703420c..1093f9fe21 100644 --- a/docs/guides/binary/typedarray-to-string.md +++ b/docs/guides/binary/typedarray-to-string.md @@ -7,7 +7,7 @@ Bun implements the Web-standard [`TextDecoder`](https://developer.mozilla.org/en ```ts const arr = new Uint8Array([104, 101, 108, 108, 111]); const decoder = new TextDecoder(); -const str = decoder.decode(buf); +const str = decoder.decode(arr); // => "hello" ```