Ad
  • Custom User Avatar

    Here's a basic template:

    using System;
    using System.Collections.Generic;
    
    public static class Kata {
      public static IEnumerable<string> FriendOrFoe (string[] names) {
        Console.WriteLine( string.Join(", ", names) );
        return names;  
      }
    }
    
  • Custom User Avatar
    Console.WriteLine(names);
    

    Should do the trick. But make sure to return something that the function expects (you could just "return names" to avoid errors).

  • Custom User Avatar

    You should use it inside the method, and you don't need brackets around "names".

  • Custom User Avatar

    See if this article helps. You can also visit Codewars Discord and ask any questions you have in #beginners, or in #help-solve channels.

    Console.WriteLine is fully operational on Codewars, and it should work if used correctly.