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,23 @@
---
title: Add New Properties to a JavaScript Object
---
You can add new properties to existing JavaScript objects the same way you would modify them.
There are two different syntaxes, dot notation and bracket notation. Dot notation is generally preferred for readability but properties must be a valid identifier.
Here is how using dot notation:
myDog.bark = "woof-woof";
Here is how using bracket notation:
```javascript
myObject['bark'] = "woof-woof";
```
Using bracket notation, we can utilize variables as property names:
```javascript
var dynamicProperty = "bark";
myObject[dynamicProperty] = "woof-woof";
```