JS Built-ins
SyntaxErrorbeginner

SyntaxError β€” .name property

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

SyntaxError inherits from Error, so it has all standard error properties.

SyntaxError Name

Every SyntaxError has a .name property equal to 'SyntaxError'.

Challenge: Verify the .name property.

πŸ’‘ Hints (1)
  • β€’ Error subtypes have a .name property matching their constructor name.