Ad
  • Custom User Avatar

    Because you don't need the quotes in the regular expression.

  • Custom User Avatar

    You're doing several things wrong there, please, review the basics first and then come back, trying to code like that is both painful and frustrating. The ifs aren't needed at all (and they're wrong), you only have to use the argument of the function player and return one property of it, you're accessing that property wrong too. I can't help anymore without giving out the solution. If after that you can't solve it, forfeiting the kata and seeing other users's solutions is an option.

  • Custom User Avatar

    No, because an object will never be equal to one of its properties. Delete the ifs and read how to access an object property, that's wrong too.

  • Custom User Avatar

    This is the initial code:

    function getCollege(player){
    //code here
    
    }
    

    As you can see the function receives only one argument. And that argument is an object. It's in the description:

    Create a function, called getCollege, that takes in an object of an nba player, and returns the college that the player went to

  • Custom User Avatar

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

  • Custom User Avatar

    Why are you returning strings? You should return a boolean.

  • Custom User Avatar

    If you don't know how to do it - then simply research (i.e google) for the answer.
    Next time you come across a similar problem you will know what your looking for.