What happens when you try to create a new Symbol using the new keyword?

  • Error is thrown
  • A new Symbol is created
  • It returns an existing Symbol
  • Symbols cannot be created using new
When attempting to create a Symbol using the new keyword, it results in an error. Symbols are primitive values, and using the new keyword with them is not allowed. Symbols are typically created without the new keyword.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *