Programming · Flashcard
What is the difference between == and ===?
Why this is the answer
=== checks value and type with no coercion, while == coerces types first (0 == "0" is true, 0 === "0" is false). It's not reversed, neither compares memory addresses, === isn't limited to numbers, and the two aren't interchangeable.
Read more in the docsMore JavaScript Fundamentals flashcards
- Which keyword declares a variable whose binding cannot be reassigned?
- Which of the following is a primitive data type in JavaScript?
- What is the main syntactic feature of an arrow function?
- What does a closure keep access to after its outer function has returned?
- Which runs first: Promise.resolve().then(f) or setTimeout(f, 0)?
