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 trialstanleyjohannes
1,704 Pointswhy is it ===?
the code challenge answer is myNullVariable === myUndefinedVariable. Can someone please help me understand this?
From my understanding === is a strict compare i.e. comparing results and data type. in this case myNullVariable is set to null and when using strict compare is never equal to myUndefinedVariable. Anybody can help?
2 Answers
Aaron Graham
18,033 PointsYou are right about how they operate. I see this question come around the forums from time to time, and it's usually confusion over what the challenge is actually asking you to do. Here is a link to a recent discussion about this challenge: https://teamtreehouse.com/forum/isnt-going-to-be-more-likely-to-equal-a-true-value-than-bit-confused-on-this-test
Hope that helps
stanleyjohannes
1,704 PointsThanks Aaron. That link gave the answer to the same question :)
Sreng Hong
15,083 PointsI see this post. I hope it's related to your question.
https://teamtreehouse.com/forum/consolelogtypeof-myvar-undefined
Aurelian Spodarec
7,369 PointsAurelian Spodarec
7,369 PointsHi, not sure but what i know the === need to be exactly =eaqul= to the other variable so its like password it will be === stricked . If you wanted to know that not sure