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 trialSusan Stufflebean
7,466 PointsWhat am I doing wrong? It is telling me the value for inTurn should be true, that is what I have???
Help
const player1 = {
name: 'Andrew',
color: 'red',
isTurn: 'true',
}
3 Answers
Alexander Solberg
14,350 PointsYou have entered true, as a string. Remove the single quotes and it should work. true/false are part of a primitive datatype in javascript called a "Boolean". When you write the values inside quotes, you turn them into a string, which is another primitive datatype.
Seth Seymour
4,963 PointsYou have true as a string value. True and false are boolean data types and do not require quotes
Susan Stufflebean
7,466 PointsThanks, it worked just great after I removed the quotes.