Tuesday 22 May 2007

arrayKeyExists()

This is also a function that should be a part of DOM core functionality. It checks if a key exists in an Array()


Array.prototype.arrayKeyExists = function (keyValue) {
for (key in this) {
if (key == keyValue) {
return true;
}
}
return false;
};

No comments: