I am having trouble to solve challenge Nr.2
Here is my idea:
I have two arrays. One with all the words and one with all the proper names. Now I want to compare these two lists and create a new array with only the words found in both arrays. This comparison should be case insensitive and therefor the third array would contain proper names and regular words that are spelled the same way. Then I want to create a fourth array by removing all the proper names from the list. As a result I would get an array that contains only regular words that could also be proper names if written with a capital first letter.
I tried to create a new array with the method caseInsensitiveCompare but failed to create it.
NSMutableArray *compare = [NSMutableArray array];
[compare addObject:[words caseInsensitiveCompare:names]];
I guessed that maybe the method caseInsensitiveCompare only works with strings so I tried:
Any ideas on how to create this third array or string?