# remove duplicates and nil array = [1, 1, 2, 3, nil] array_duplicate = array.compact array_nil = array.reject? {|c| c.empty} # find items matching string "Si" array = ['Simple', 'Ample', 'Sit'] def check_array if array end # find users where the score is more than 100 array = [ { name: 'Dan', score: 110 }, { name: 'Mike', score: 57 }, { name: 'Jill', score: 120 } ] #sum of values hash = {"a"=>10, "b"=>20, "c"=>30} hash1 = hash.merge(hash[0]).merge([]hash1]).merge([hash[2]) sum_of_values = hash1.inject[sum+] # find common items from below arrays array1 = [1, 2, 3 ] array2 = [0, 5, 2] print array3 = array1 & array2 # use below methods with proper arguments def func1(*input) puts input end def func2(**input) puts input end # for example def math(x, y) end math(2,3) # use metaprogramming to refactor these methods def admin? role == 'admin' end def marketer? rol...