Node.js · Middle · Question 57 of 75
Which node:assert function compares objects by their contents?
- ✓Correct answer:
assert.deepStrictEqual - 2
assert.strictEqual - 3
assert.equal
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.