
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:18 PM
Hello guys,
Is it possible to join two arrays this way?
var arr = [ "test1", "test2", "test3" ];
var arr1 = [ "test4" ];
I need to join two arrays like this:
var arr2 = [ "test1", "test2", "test3" , "test4"];
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:28 PM
Hello
do like below
arr.concat(arr1)
This will combine two arrays
Please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:28 PM
Hello
do like below
arr.concat(arr1)
This will combine two arrays
Please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 08:31 AM
Hello mohith,
can we combine two arrays based on index
var arr1 = [a , b ,c];
var arr2 = [1,2,3];
var arr3 = {[a,1],[b,2],[c,3]};
Any answer can be appreciated.Thank yoU!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:48 PM
You will use normal Javascript function:
arr2 = arr.concat(arr1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 05:31 PM