# Playing with arrays ## Check if all array elements are equals ```ruby arr = [0, 0, 0, 0, 0, 0, 0] puts true if arr.uniq.length == 1 ``` ## Array includes a sub array ```ruby (subarray & array) == array ``` ## Compute values occurences ```ruby [1, 1, 2, 3, 4, 5, 5, 5, 5].tally => {1=>2, 2=>1, 3=>1, 4=>1, 5=>4} ```