# Plz help..!

**URL:** <https://forum.kirupa.com/t/plz-help/210711>\
**Category:** Uncategorized\
**Created:** [December 21, 2006, 8:30am UTC](https://forum.kirupa.com/t/plz-help/210711 "2006-12-21T08:30:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvnirmal](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@gvnirmal](https://forum.kirupa.com/u/gvnirmal)\
**Post date:** [December 21, 2006, 8:30am UTC](https://forum.kirupa.com/t/plz-help/210711/1 "2006-12-21T08:30:45Z")

</div>

Hi all

I am writing a code like this:  
if (true)  
{  
myData = this.firstChild;  
//trace("XML Contents = " + this.firstChild);  
//trace(“XML Children =” + myData.childNodes);  
var myArr = new Array(4);  
//trace("Date = " + myData.childNodes[0]);  
myArr[0] = myArr.push(myData.childNodes[0]);  
for(i=1;i\<4;i++)  
{  
//trace(“pkg " + i +”: "+myData.childNodes\*.firstChild);  
myArr\* = myArr.push(myData.childNodes\*.firstChild);  
}  
myArr.reverse();  
trace(myArr);  
if(contains(“1.pkg”,myArr)==1)  
{  
trace(“1.pkg is present”);  
}  
else  
{  
trace(“1.pkg is not present”);  
}  
}  
};

I have two problems here:  
1.When I am creating an array of size 5…in the output I am able to see 10 values in which 5 are correct and the other 5 are junk values…??Why is this happening so…?  
2.When I am searching for a value called 1.pkg…It is showing me that it is not present in the array…but 1.pkg is still present in the array…?

Can anyone help me in getting out of this…??
