for..in
JavaScript
var array = [3, 4, 7, 9, 10, 13];
var secondArray = [3, 4, 9, 13, 23];
var object = {"cat" : 3, "dog": 10};
function containsTen(toCheck) {
//Note that x refers to the index of an array, not the actual value itself.
//This is true when objects are used as well.
for(var x in toCheck) {
if(toCheck[x] == 10)
return true;
}
return false;
}