Example 1 — Official Foo Instance
Own fields plus an inherited prototype value.
function Foo() {
this.a = 1;
this.b = 2;
}
Foo.prototype.c = 3;
_.valuesIn(new Foo);
// → [1, 2, 3] How It Works
- Own. Instance has
aandb. - Inherited. Prototype adds enumerable
c. - Collect. Values become
1,2, then3. - Result. New array — object unchanged.

