Files

24 lines
494 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Build JavaScript Objects
---
# Build JavaScript Objects
---
## Hints
2018-10-12 15:37:13 -04:00
### Hint 1
Objects are similar to arrays, except that instead of using indexes to access and modify their data, you access the data in objects through what are called properties.
2018-10-12 15:37:13 -04:00
Here's a sample object:
```js
var cat = {
name: "Whiskers",
legs: 4,
tails: 1,
enemies: ["Water", "Dogs"]
};
```
2018-10-12 15:37:13 -04:00
Objects are useful for storing data in a structured way, and can represents real world objects, like a cats.