Hi. I have a problem doing this task. I just learned it and don’t understand. Below is the case.
Make a function / method that accepts parameters in the form of an array whose contents are strings. The task of the function is to look for words that have the same alphabet / character as other words in the array. For example “paint” with “act”, “code” with “deco”. If none is found then the output is “Not found!”. Make a parameter check if the given parameter is not an array!
Input: findSame([“cat”, “listen”, “code”, “act”, “silent”, “tac”])
Output: cat, act, tac
listen, silent
Input: findSame([“try”, “fire”, “dark”])
Output: “Not Found!”