Node.js · Middle · Question 57 of 75

Which node:assert function compares objects by their contents?

Explanation

strictEqual uses Object.is, so two different objects with the same content are not equal. Import from node:assert/strict to get strict versions by default.

Further reading

Problem with a question

Node.js · Middle · question 57

Test yourself

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

Take this quiz