Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTyriec Peoples-Galloway
1,236 PointsCreate an array of objects
im not understanding how it wants me to write out the variable
var objects =[ "blade", "wolves", "hearts" ];
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
Amrit Pandey
17,595 PointsSo, I cannot completely understand your question but,
by array of objects
it means we have to create an array containing objects
var someObject = {};
This is an object,
var someArray = [];
This is an array,
var arrayOfObjects = [
{object1},
{object2},
{object3},
....
]
This is an array of objects.
Gustavo Winter
Courses Plus Student 27,382 PointsGustavo Winter
Courses Plus Student 27,382 PointsHi, the task ask you to add three object literals. In other words, the objects array should have three values. Each object should have 2 property/value pairs.
In your code you make an array with tree objects but without any property/value.
Look this, i'm sure you will be able to increase your code: