freeCodeCamp/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables/index.md
2018-10-16 21:32:40 +05:30

508 B

title localeTitle
Accessing Object Properties with Variables الوصول إلى خصائص الكائن مع المتغيرات

الوصول إلى خصائص الكائن مع المتغيرات

إليك حلًا عمليًا في حالة عطلك:

`// 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 `