JavaScript · Middle · Question 50 of 75

What does {} === {} return?

Explanation

Objects are compared by reference: two literals are two different objects. Comparing contents needs your own deep-equal function or a library. This matters for useEffect dependencies and memoization in React.

Further reading

Problem with a question

JavaScript · Middle · question 50

Test yourself

Take the JavaScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz