JS Built-ins
TextDecoderbeginner

TextDecoder β€” instanceof check

πŸ“– Usage Example
const dec = new TextDecoder('iso-8859-1')
dec.encoding  // β†’ 'windows-1252'

TextDecoder normalizes encoding labels to their canonical names.

TextDecoder instanceof

new TextDecoder() instanceof TextDecoder is true.

Challenge: Verify the instanceof check.

πŸ’‘ Hints (1)
  • β€’ TextDecoder is a constructor, so new TextDecoder() is an instance of it.