1. Why is the assert module used in Node.js?
The assert module helps test conditions in code. It throws errors if an expression evaluates to false, making it useful for debugging and creating unit tests in Node.js.
const assert = require('assert');
assert.strictEqual(2 + 2, 4);