Question · JavaScript and TypeScript course · Module 1: JavaScript Basics

Difference Between == and ===

What will the comparison 5 === '5' return in JavaScript?

Answer options

  • undefined
  • false - different data types (number vs string)
  • TypeError
  • true - the values are equal
Show the answer

Correct answer:

  • false - different data types (number vs string)