.. Operator (string)

Concatenates two strings.  If the operands are not strings, they are converted to strings first.

Usage Restrictions

1.8.2 or later.

Samples


Output

To concatenate two constant strings:

{{ "Hello " .. "World!" }} 

Hello World!

To concatenate a string with a number:

{{ "1+1=" .. 1+1 }}

1+1=2

.. Operator (list/map)

Concatenate two lists or maps.  For lists, a new list is created by appending the right list to the left list.  For maps, a new map is created by first adding the key-value pairs from the left map and then from the right map.  If a key-value pair with the same key exists in both maps, then the one from the right map overwrites the one from the left map.  If either the left or right value is nil, the other value is returned instead.

Usage Restrictions

1.9.1 or later.

Samples


Output

To combine two lists:

{{ [ 1, 2, 3 ] .. [ 4, 5, 6 ] }}

[ 1, 2, 3, 4, 5, 6 ]

To combine two maps:

{{ { a: 1 } .. { b: 2, c: 3 } }}

{ a : 1, b : 2, c : 3 }

 

Tag page (Edit tags)
    You must login to post a comment.