The code below will log a, a.length, and b.test. a and b.test both yield [1, 2, 3]. Edit-- I screwed up. b.test yields undefined. See raina's response below.
a.length yields 3.
b.test.length fails with "Cannot read property 'length' of undefined"
Why is this the case when a and b.test are equal?
var a = [1,2,3];
var b = function(){};
b.prototype.test=[1,2,3];
console.log(a);
console.log(a.length);
console.log(b.test);
console.log(b.test.length);