Why does 5 == '5' return true?
JavaScript converts the string '5' into a number before comparison.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in What Is the Difference Between == and ===?
Still have questions?
Browse all our FAQs or reach out to our support team
