Ad
  • Custom User Avatar

    no random tests

  • Default User Avatar

    'students' property of classes objects hold an array of 'id' values (your 'item' variable): a number referering to the 'id' property of the students objects listed in the array of students object given as second argument... you should search and find inside the object with the related 'id' property, not acccess the 'students' array directly with it (this is not an index).

  • Default User Avatar

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

  • Default User Avatar

    new line is supposed to be "\n"

  • Custom User Avatar

    Not only that, there's only one test, and it's the same as the example. It would be trivial for someone to return the example solution and pass.

    You need more test cases, including edge cases (no classes, no students, what about missing student IDs?). Randomized test cases.

  • Custom User Avatar

    Are you trying to escape newlines? Escaping in JavaScript is "\n", not "/n".