TextEncoder.prototype.encoding

The encoding of the TextEncoder object. Always "utf-8".

Syntax

encoding

Example

let encoder = new TextEncoder()
encoder.encoding
"utf-8"