Write a function that returns the greatest common divisor of all array elements. If the greatest common divisor is 1, return 1.
1
gcd([10, 20, 40]) ➞ 10 gcd([1, 2, 3, 100]) ➞ 1 gcd([1024, 192, 2048, 512]) ➞ 64
0