Input 1:
const inputArrayOfStrings1 = ["j", "k", "k", "l", "m", "n", "o"];
mostCommon(inputArrayOfStrings1);
Output 1:
"k"
Input 2:
const inputArrayOfStrings2 = ["ijk", "ijk", "xyz", "xyz", "ijk", "opr", "stu"];
mostCommon(inputArrayOfStrings2);
Output 2:
"ijk"
Input 3:
const inputArrayOfStrings3 = ["abc", "def"];
mostCommon(inputArrayOfStrings3);
Output 3:
"abc"