We’ve talked here on the blog about arrays in JavaScript and how to work with them to create and manipulate the data in an array tasks are really simple but the language provides other means to further facilitate the life of programmers. JOIN and CONCAT methods are great examples of this, and we know a little more about them in sequence.


This method is used when you want to join an array into a single string using a separator character, check out the example below:

<script language=”JavaScript” type=”text/javascript”>
var num = new Array (3);
num[0] = 10;
num[1] = 20;
num[2] = 30;
document.write (num.join(“/”));

What will be printed to the screen from the code shown in the example is “10/20/30”, this way you can create a single string with all the data separated by the character entered.


This method is used to join two or more arrays into one, as shown below:

<script language=”JavaScript” type=”text/javascript”>
var Text1= new Array (“1″, “2″, “3″);
var Text2 = new Array (“4″, “5″, “6″);

var uni = Texto1.concat(Texto2);
document.write (uni);

he result to be displayed on the screen will be “1,2,3,4,5,6”.


The practical use of each of these methods will vary according to the logic that will be applied, so well understand how they work can help solve a problem eminent.

Test this and other code in Javascript Scriptcase enjoy and also test the various features our tool to be releasing, do not waste time and download now the free version of our tool and enjoy.

You might also like…

How the Scriptcase folders work

As a Scriptcase developer, it is convenient to know everything in detail about the environment. Th...

Do they pay for your system or code?

For all those who develop system and softwares every day at work: Have you ever wondered what makes...

What is Business Intelligence anyways?

Surely you have listened about the expression, “BI” or “Business Intelligence”, the questio...

You might also like…

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.