TextDecoder.prototype.decode

Decodes a UTF-8 Uint8Array into a string.

Syntax

decode(bytes)

Parameters

Example

new TextDecoder().decode(new Uint8Array([104, 101, 108, 108, 111]))
"hello"

See also