I am trying to write a function that will take two string array and concat them but will escape duplicate array. For instance, in below two arrays cat is common. So I need to take cat only one time
input array1 = ["dog", "cat", "rat"]
input array2 = ["fat", "cat", "bat"]
output array = ["dog", "cat", "rat", "fat", "bat"]
Any guidance/ solution with built-in function or without any built-in function will help. TIA