Junior — Senior
What will be the output result in task №18
livecode
Task condition
This example demonstrates the behavior of a mutable array NSMutableArray in Swift when one variable is assigned to another. It is necessary to understand how both variables will change after adding an element.
var arr1 = NSMutableArray(array: ["0"])
var arr2 = arr1
arr2.add("1")
print(arr1, arr2)