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 trial

JavaScript React Basics (retired) Thinking in Components Properties Review

Nathan Knight
Nathan Knight
1,777 Points

I'm not sure why "React.PropTypes.string.isRequired," is incorrect.

I'm not sure why this is not an acceptable answer, maybe I'm just making a syntax error or am I completely off-base? My answer: React.PropTypes.string.isRequired,

2 Answers

andren
andren
28,558 Points

The only issue is that you have a comma at the end, if you remove the comma and just type React.PropTypes.string.isRequired then the Quiz accepts the answer.

Commas are used to separate different properties in a JavaScript object, it is not a part of the property value itself.

Nathan Knight
Nathan Knight
1,777 Points

Ah, I see. So, should there be a semicolon at the end then?