Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Return type for the function is not set in the TypeScript version.

    export function countSmileys(arr: string[])  {
    ...
    }
    

    should be something like:

    export function countSmileys(arr: string[]) :number {
    ...
    return 0;
    }
    

    this establishes a correct return type and value and prevents runtime errors upon testing.