Find String in Array That is Repeated an Odd Number of Times

You are given an array of lowercase single word strings containing some duplicates as an argument. Return the string that is duplicated an odd number of times.

The argument array will only ever have one string that matches this criteria.


  • Must return a single string

Example #1

solve(['apple', 'orange', 'banana', 'apple', 'apple', 'orange', 'banana'] )
> "apple"