JS Built-ins
TextDecoderintermediate

TextDecoder β€” ignoreBOM property

πŸ“– Usage Example
new TextDecoder() instanceof TextDecoder  // β†’ true

TextDecoder instances can be checked with instanceof.

TextDecoder ignoreBOM Property

When ignoreBOM is false (the default), a leading byte-order mark is stripped from the decoded output. The property reflects the constructor option.

Challenge: Verify that new TextDecoder().ignoreBOM === false.

πŸ’‘ Hints (1)
  • β€’ ignoreBOM defaults to false; set it to true to keep the BOM in output.