Checking for null elements in a subset?

Hey. If I have an array of objects that has elements, how can I check to see if elements 3-30 are null or not? Thanks

foreach( element in array)
{
if(element == null)
{
// It’s null!
}
}

for(int i = 0; i < array.Length; ++i)
{
    if(array *== null)*

{
// Element ‘i’ is null!
}
}
And so on. If you’re using Javascript for some reason, the syntax changes a little-
for(var element : in array)
{
if(element == null)
{
// and so on
}
}