Arrays(Chapter 6 of JavaScript: The Good Parts)
code
1 var is_array = function (value) {
2 return value &&
3 typeof value === 'object' &&
4 typeof value.length === 'number' &&
5 typeof value.splice === 'function' &&
6 !(value.propertyIsEnumerable('length'));
7 };
8
2 return value &&
3 typeof value === 'object' &&
4 typeof value.length === 'number' &&
5 typeof value.splice === 'function' &&
6 !(value.propertyIsEnumerable('length'));
7 };
8