Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the first program the method on line two combines the array [1, 2, 3] with ["a", "b"]. Then in the third line of code it selects the first element of the array, ["b", 1] then uses the delete operator to delete the first.last of the arr array which happens to be 1. The program returns 1. In the second program it runs exactly the same except for the Array(1..3) is now nested as Array([1..3)]. After the product conversion arr instead becomes ["b", [1, 2, 3]], ["a", [1, 2, 3]]. In line three it once again removes the last element of the first element of arr and returns with [1, 2, 3].
- Loading branch information