Example 1 — Official: Object vs Number
The docs contrast a plain object with a number.
_.isObject({});
// → true
_.isObject(1);
// → false How It Works
- Empty object.
{}has typeof"object"and is truthy →true. - Number.
1has typeof"number"→ not a function or object →false. - Official pair. This is the example from the Underscore documentation.
- Read-only. Nothing is mutated; you only get a boolean.

