View Single Post
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Adding Array To Another Array

 
0
  #5
Nov 22nd, 2008
Or you can simply do it with the push() method. Code is as follow:
  1. <script type="text/javascript">
  2. var arr1 = [1,2,3,4];
  3. var arr2 = [5,6,7,8];
  4. for (var x = 0; x <= arr2.length; x++) {
  5. arr1.push(arr2[x]) }
  6. document.write(arr1 + '<br />')
  7. </script>
hope it clears you up, and good day to you...
Reply With Quote