Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created October 8, 2010 21:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejefflarson/617604 to your computer and use it in GitHub Desktop.
Save thejefflarson/617604 to your computer and use it in GitHub Desktop.
var ArrayProto = Array.prototype
, ObjProto = Object.prototype
;
// Array Tests
["forEach", "map", "reduce", "reduceRight", "filter", "every", "some",
"indexOf", "lastIndexOf"].forEach(function(key){
var d = document.createElement("div");
d.textContent = key + ": " + ArrayProto[key];
document.body.appendChild(d);
});
var d = document.createElement("div");
d.textContent = "Array.isArray: " + Array.isArray;
document.body.appendChild(d);
var e = document.createElement("div");
e.textContent = "Object.keys: " + Object.keys;
document.body.appendChild(e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment