# Help~! array.unshift

**URL:** <https://forum.kirupa.com/t/help-array-unshift/192969>\
**Category:** Uncategorized\
**Created:** [July 3, 2006, 7:36am UTC](https://forum.kirupa.com/t/help-array-unshift/192969 "2006-07-03T07:36:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leb](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@leb](https://forum.kirupa.com/u/leb)\
**Post date:** [July 3, 2006, 7:36am UTC](https://forum.kirupa.com/t/help-array-unshift/192969/1 "2006-07-03T07:36:35Z")

</div>

seek for help again…  
i want to add an element from an array to the beginning of another array, using unshift method, but it turns to cause my pc hangs…

i use two ways, but both are not the solution.  
help me…

//method1:  
temp\_array[0]=arrayName[p][k];  
openList.unshift(temp\_array[0]);

//method2:  
openList.unshift(arrayName[p][k]);
