How to Access Object Properties with Variables

Tell us what’s happening:
Hi guys, please can anyone explain this to me futher?

** My code so far**


// Setup
var testObj = {
  12: "Namath",
  16: "Montana",
  19: "Unitas"
};

// Only change code below this line;

var playerNumber = 16;       // Change this Line
var player = testObj[ "Motana"];   // Change this Line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables

var object = {
  key: "value"
}

You look up a key in an object to get a value.

var dictionary = {
  word: "definition"
}

You look up a word in a dictionary to get its definition.

At the minute, you have an object, a variable that represents a key. So you need to look up a key in an object…

This (var player = testObj[ "Motana"];) is trying to look up a value by trying to look up the value, exactly like trying to find the definition of a word in a dictionary by looking up the definition.