485 B
485 B
title | localeTitle |
---|---|
Accessing Object Properties with Variables | Acessando propriedades de objetos com variáveis |
Acessando propriedades de objetos com variáveis
Aqui está uma solução de trabalho, caso você esteja preso:
// Setup
var testObj = {
12: "Namath",
16: "Montana",
19: "Unitas"
};
// Only change code below this line;
var playerNumber = 16; // Change this Line
var player = testObj[playerNumber]; // Change this Line