Ad
  • Custom User Avatar

    As the instructions said that name is a property of the object 'Players', Also we can't target the name of the player unless we use the Key Value which is the name: the structure is like that :
    Players[{name: "a"}, {name: "b"} ... {name: "z}];

  • Custom User Avatar

    hell no! this func called sortByLength.

    If you mean like callback function - yes it is anonymous

  • Custom User Avatar

    Every player (element in players array) is constructed into an object:

    class Player {
      constructor(name) {
      	this.name = name;
      }
    }
    let players = ex_names.map((n) => new Player(n));
    

    .name allows you to access and return the property value. If it would not be there you would return the whole object. For example Player { name: 'a' }