Append item to array

 Problem

I want to append an item to an existing Array.



 Recipe


// Initialize the Array
var a = [1,2,3]

// Append another item - solution A
a += [4]

// Append another item - solution B
a.append(5)

print(a)
		
				


 Playground