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 trialIris Wang
Front End Web Development Techdegree Student 8,288 PointsJavaScript Objects and Properties
The code challenge asked to create an object called paris with 3 properties (population, latitude and longtitude) the values are given in the challenge. But i keep getting an error message saying that my properties for the object are not stated. Can someone help me find out what is wrong with my code? Much appreciated.
var paris = {
population : '2.211e6',
latitude : '48.8567 N',
longtitude : '2.3508 E'
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
kareem Pierre
Full Stack JavaScript Techdegree Student 20,263 PointsHey Iris,
I would check your spelling for the third property. The question is asking for the exponential notation. Your value for your first property is a string. I would remove the quotations and you should pass.
Iris Wang
Front End Web Development Techdegree Student 8,288 PointsIris Wang
Front End Web Development Techdegree Student 8,288 PointsHi Kareem,
Thank you for your reply. I have removed the quotations but it still didn't pass the challenge. However when I tried repeating the same steps in an external text editor, it worked fine in the JavaScript console. So I'm still not sure what the problem is, with my answer to the challenge. But thank you for checking through , much appreciated!