fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,30 @@
---
title: Declare JavaScript Objects as Variables
localeTitle: قم بتعريف كائنات JavaScript كمتغيرات
---
هذا له تنسيق بسيط. تقوم بتعريف المتغير الخاص بك ويكون له مساوٍ لكائن في النموذج `{ key: value}`
`var car = {
"wheels":4,
"engines":1,
"seats":5
};
`
يمكنك الوصول إلى خصائص الكائن باستخدام تدوين النقطة أو تدوين قوس.
باستخدام ميزة التدوين النقطي:
`console.log(car.wheels); // 4
`
باستخدام تدرج قوس:
`console.log(car["wheels"]); // 1
`
استخدام تدرج قوس ديناميكي:
`var seatsProperty = "seats";
console.log(car[seatsProperty]); // 5
`