JavaScript Professional — Hard
Key points
- The 'default' hint is triggered when using == with a string
- The Symbol.toPrimitive method is invoked in this comparison
- The return value of the method is compared to the string
- This comparison results in true because the values match
Ready to go further?
Related questions
