Lasso Soft Inc. > Home

[ array->+ ]

Method

Concatenates two arrays together into a new array without affecting the originals. The combined array preserves the order of the elements of the contributing arrays.

  • Syntax
array_one + array_two
Examples
  • Beginner

Combine the elements of two arrays into a new array.

Create a new array from the combined elements of two arrays.

Code

var( DaysOfWeek = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'),
     JoursDuSemaine = array('Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim') )
     
var( CombinedDays =  $DaysOfWeek + $JoursDuSemaine )

'DaysOfWeek: '+$DaysOfWeek+', is type '+$DaysOfWeek->type
'JoursDuSemaine: '+$JoursDuSemaine+', is type '+$JoursDuSemaine->type
'CombinedDays: '+$CombinedDays+', is type '+$CombinedDays->type

Result

DaysOfWeek: array(Sun, Mon, Tue, Wed, Thu, Fri, Sat), is type array
JoursDuSemaine: array(Lun, Mar, Mer, Jeu, Ven, Sam, Dim), is type array
CombinedDays: array(Sun, Mon, Tue, Wed, Thu, Fri, Sat, Lun, Mar, Mer, Jeu, Ven, Sam, Dim), is type array

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft